Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- upstream backend {
- server 127.0.0.1:9000;
- }
- server {
- listen 80;
- server_name muylinux.com *.muylinux.com;
- rewrite ^ http://www.muylinux.com/$request_uri permanent;
- }
- server {
- listen 80;
- access_log /var/www/muylinux/log/access.log;
- error_log /var/www/muylinux/log/error.log info;
- server_name www.muylinux.com;
- root /var/www/muylinux/;
- index index.php;
- location / {
- try_files $uri $uri/ /index.php?q=$request_uri;
- }
- ## Images and static content is treated different
- location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
- access_log off;
- expires 30d;
- }
- ## Parse all .php file in the /var/www directory
- location ~ \.php$ {
- try_files $uri $uri/ /index.php?q=$request_uri;
- fastcgi_split_path_info ^(.+\.php)(.*)$;
- fastcgi_pass backend;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params; # This file has most of your old calls already.
- fastcgi_intercept_errors on;
- fastcgi_ignore_client_abort on;
- fastcgi_read_timeout 180;
- }
- ## Disable viewing .htaccess & .htpassword
- location ~ /\.ht {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement