Last active
January 2, 2016 02:19
-
-
Save danreb/8235954 to your computer and use it in GitHub Desktop.
Drupal 7 in sub directories ...
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 { | |
server_name test.domain.com; | |
listen xxx.xxx.xxx.xxx; | |
root /home/testuser/public_html; | |
index index.html index.htm index.php; | |
access_log /var/log/virtualmin/test.domain.com_access_log; | |
error_log /var/log/virtualmin/test.domain.com_error_log; | |
fastcgi_param GATEWAY_INTERFACE CGI/1.1; | |
fastcgi_param SERVER_SOFTWARE nginx; | |
fastcgi_param QUERY_STRING $query_string; | |
fastcgi_param REQUEST_METHOD $request_method; | |
fastcgi_param CONTENT_TYPE $content_type; | |
fastcgi_param CONTENT_LENGTH $content_length; | |
fastcgi_param SCRIPT_FILENAME /home/testuser/public_html$fastcgi_script_name; | |
fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
fastcgi_param REQUEST_URI $request_uri; | |
fastcgi_param DOCUMENT_URI $document_uri; | |
fastcgi_param DOCUMENT_ROOT /home/testuser/public_html; | |
fastcgi_param SERVER_PROTOCOL $server_protocol; | |
fastcgi_param REMOTE_ADDR $remote_addr; | |
fastcgi_param REMOTE_PORT $remote_port; | |
fastcgi_param SERVER_ADDR $server_addr; | |
fastcgi_param SERVER_PORT $server_port; | |
fastcgi_param SERVER_NAME $server_name; | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_pass unix:/var/php-nginx/138629877216905.sock/socket; | |
} | |
# Run Drupal in a subdirectory | |
location ~ ^/([^/]*)/(.*)$ { | |
try_files $uri $uri/ /$1/index.php?q=$2&$args; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment