server {
listen 00.00.00.00:80;
server_name site.com www.site.com;
return 301 https://site.com$request_uri;
}
server {
listen 00.00.00.00:80;
server_name site.com;
error_log /var/log/apache2/domains/site.com.error.log error;
location / {
proxy_pass http://00.00.00.00:8080;
location ~* ^.+\.(jpg|jpeg|gif|png|ico|svg|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|odt|ods|odp|odf|tar|wav|bmp|rtf|js|mp3|avi|mpeg|flv|html|htm)$ {
root /home/admin/web/site.com/public_html;
access_log /var/log/apache2/domains/site.com.log combined;
access_log /var/log/apache2/domains/site.com.bytes bytes;
expires max;
try_files $uri @fallback;
}
}
location /error/ {
alias /home/admin/web/site.com/document_errors/;
}
location @fallback {
proxy_pass http://00.00.00.00:8080;
}
location ~ /\.ht {return 404;}
location ~ /\.svn/ {return 404;}
location ~ /\.git/ {return 404;}
location ~ /\.hg/ {return 404;}
location ~ /\.bzr/ {return 404;}
include /home/admin/conf/web/nginx.site.com.conf*;
}
server {
listen 00.00.00.00:443;
server_name site.com www.site.com;
ssl on;
ssl_certificate /home/admin/conf/web/ssl.site.com.pem;
ssl_certificate_key /home/admin/conf/web/ssl.site.com.key;
error_log /var/log/apache2/domains/site.com.error.log error;
location / {
proxy_pass https://00.00.00.00:8443;
location ~* ^.+\.(jpg|jpeg|gif|png|ico|svg|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|odt|ods|odp|odf|tar|wav|bmp|rtf|js|mp3|avi|mpeg|flv|html|htm)$ {
root /home/admin/web/site.com/public_html;
access_log /var/log/apache2/domains/site.com.log combined;
access_log /var/log/apache2/domains/site.com.bytes bytes;
expires max;
try_files $uri @fallback;
}
}
location /error/ {
alias /home/admin/web/site.com/document_errors/;
}
location @fallback {
proxy_pass https://00.00.00.00:8443;
}
location ~ /\.ht {return 404;}
location ~ /\.svn/ {return 404;}
location ~ /\.git/ {return 404;}
location ~ /\.hg/ {return 404;}
location ~ /\.bzr/ {return 404;}
include /home/admin/conf/web/snginx.site.com.conf*;
}