Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name ~^(www\.)?(?<domain>.+)$;
- root /var/www/$domain;
- access_log /var/log/nginx/domain-access.log;
- error_log /var/log/nginx/domain-error.log;
- index index.php index.html;
- rewrite_log on;
- location ~* ^/core/ {
- deny all;
- }
- location / {
- try_files $uri $uri/ @rewrite;
- }
- location /index.html {
- rewrite / / permanent;
- }
- location ~ ^/(.*?)/index\.html$ {
- rewrite ^/(.*?)/ // permanent;
- }
- location @rewrite {
- rewrite ^/(.*)$ /index.php?q=$1;
- }
- location ~ \.php$ {
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_pass backend-valhalla;
- }
- location ~* ^.+\.(jpg|jpeg|gif|png|ico|bmp)$ {
- #access_log off;
- expires 10d;
- break;
- }
- location ~* ^.+\.(css|js)$ {
- #access_log off;
- expires epoch;
- break;
- }
- location ~ /\.ht {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement