Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen *:80;
- server_name vds.example.com www.vds.example.com *.gq *.tk;
- root /home/user1/web/vds.example.com/public_html;
- index index.php index.html index.htm;
- access_log /var/log/nginx/domains/vds.example.com.log combined;
- access_log /var/log/nginx/domains/vds.example.com.bytes bytes;
- error_log /var/log/nginx/domains/vds.example.com.error.log error;
- rewrite sitemap\.xml$ /sitemap.php break;
- rewrite robots\.txt$ /robots.php break;
- if (!-e $request_filename) {
- rewrite ^.*$ /index.php last;
- }
- location / {
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
- location ~ \.php$ {
- fastcgi_pass unix:/run/php/php7.0-fpm.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param PHP_VALUE "error_log=/var/log/nginx/pack_errors.log";
- fastcgi_buffers 16 16k;
- fastcgi_buffer_size 32k;
- include fastcgi_params;
- }
- }
- error_page 403 /error/404.html;
- error_page 404 /error/404.html;
- error_page 500 502 503 504 /error/50x.html;
- location /error/ {
- alias /home/user1/web/vds.example.com/document_errors/;
- }
- location ~* "/\.(htaccess|htpasswd)$" {
- deny all;
- return 404;
- }
- location /vstats/ {
- alias /home/user1/web/vds.example.com/stats/;
- include /home/user1/conf/web/vds.example.com.auth*;
- }
- include /etc/nginx/conf.d/phpmyadmin.inc*;
- include /etc/nginx/conf.d/phppgadmin.inc*;
- include /etc/nginx/conf.d/webmail.inc*;
- include /home/user1/conf/web/nginx.vds.example.com.conf*;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement