Created
February 11, 2012 22:25
-
-
Save sofasurfer/1804706 to your computer and use it in GitHub Desktop.
NGINX MODX Host File
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
# MODX Redmine Virtual Host Config | |
# @sofasurfer.org | |
server { | |
listen 80; | |
server_name *.mymodx.com *.amazonaws.com; | |
root /var/www/mymodx; | |
index index.php; | |
client_max_body_size 30M; | |
access_log /var/log/nginx/access-mymodx.log main; | |
# redirect to www | |
if ($host = 'mymodx.com' ) { | |
rewrite ^/(.*)$ http://www.mymodx.org/$1 permanent; | |
} | |
location / { | |
# redirect MODX URL rewrite | |
if (!-e $request_filename) { | |
rewrite ^/(.*)$ /index.php?q=$1 last; | |
} | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(.*)$; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
fastcgi_ignore_client_abort on; | |
fastcgi_param SERVER_NAME $http_host; | |
#fastcgi_param HTTPS on; | |
#fastcgi_param HTTPS $php_https; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment