Created
February 5, 2015 15:08
-
-
Save alexander-ae/f702fe052626fa87cfc4 to your computer and use it in GitHub Desktop.
nginx: django + wordpress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
# server_name base.pe; | |
server_tokens off; | |
root /home/devstaff/webapps/; | |
location /blog { | |
index index.php index.html index.htm; | |
try_files $uri $uri/ /blog/index.php?q=$uri&$args; | |
} | |
location ~ .+\.php$ { | |
include /home/devstaff/opt/nginx/conf/fastcgi_params; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
location /static_web { | |
alias /home/devstaff/webapps/static_web/ ; | |
expires 7d; | |
} | |
location /media_web { | |
alias /home/devstaff/webapps/media_web/ ; | |
} | |
location = /favicon.ico { | |
rewrite "/favicon.ico" "/static_web/img/favicon/favicon-256.png"; | |
expires 7d; | |
} | |
location / { | |
include uwsgi_params; | |
uwsgi_pass unix:///home/devstaff/tmp/uwsgi.sock; | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root html; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment