Created
August 2, 2013 04:06
-
-
Save dragolabs/6137419 to your computer and use it in GitHub Desktop.
nginx config for vbulletin 5 forum. And read the comments in config.php: // ****** Base URLs ****** // The following settings all deal with the url of your forum. // If set incorrectly your site/software will not function correctly. // These urls should NOT include a trailing slash <------- !!! // This is the url and web path of your root vBulle…
This file contains 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 forum.example.com; | |
root /var/www/example_forum/; | |
index index.php; | |
access_log /var/log/nginx/forum.example.access.log main; | |
error_log /var/log/nginx/forum.example.error.log; | |
rewrite /css.php$ /core/css.php last; | |
rewrite /install$ /core/install/ last; | |
location ~* ^.+\.(js|json|ico|gif|jpg|jpeg|pdf|png|css|woff|ttf|otf|eot)$ { | |
root /var/www/example_forum/; | |
access_log off; | |
log_not_found off; | |
expires 7d; | |
} | |
location / { | |
try_files $uri $uri/ @vbulletin; | |
} | |
location = /admincp/ { | |
try_files $uri @vbulletin; | |
} | |
location @vbulletin { | |
fastcgi_pass 127.0.0.1:9000; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root/index.php; | |
fastcgi_param QUERY_STRING routestring=$uri&$args; | |
} | |
location ~ \.php$ { | |
try_files $uri @vbulletin; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; | |
include fastcgi_params; | |
fastcgi_intercept_errors on; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works like a charm, unlike the original vhost file...