Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name dimasrocks.com;
- root /var/www/dimasrocks.com/public_html;
- index index.php index.html index.htm;
- #access_log logs/host.access.log;
- location / {
- # this serves static files that exist without running other rewrite tests
- if (-f \$request_filename) {
- expires 30d;
- break;
- }
- # this sends all non-existing file or directory requests to index.php
- if (!-e $request_filename) {
- rewrite ^/css/(.)$ /wp-content/themes/roots/css/$1 last;
- rewrite ^/js/(.)$ /wp-content/themes/roots/js/$1 last;
- rewrite ^/img/(.)$ /wp-content/themes/roots/img/$1 last;
- rewrite ^/plugins/(.)$ /wp-content/plugins/$1 last;
- rewrite ^/(.*)$ /index.php last;
- }
- }
- location /codeigniter_app/ {
- # canonicalize codeigniter url end points
- # if your default controller is something other than "welcome" you should change the following
- if ($request_uri ~* ^(/codeigniter_app/scratch(/index)?|/index(.php)?)/?$)
- {
- rewrite ^(.*)$ /codeigniter_app/ permanent;
- }
- # removes trailing "index" from all controllers
- if ($request_uri ~* index/?$)
- {
- rewrite ^/(.*)/index/?$ /$1 permanent;
- }
- # removes trailing slashes (prevents SEO duplicate content issues)
- if (!-d $request_filename)
- {
- rewrite ^/(.+)/codeigniter_app/$1 permanent;
- }
- # removes access to "system" folder, also allows a "System.php" controller
- if ($request_uri ~* ^/codeigniter_app/system)
- {
- rewrite ^/(.*)$ /codeigniter_app/index.php?/$1 last;
- break;
- }
- if (!-e $request_filename) {
- rewrite ^/(.*)$ /codeigniter_app/index.php?/$1 last;
- }
- }
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- location ~ \.php$ {
- root public_html;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_param SCRIPT_FILENAME /var/www/dimasrocks.com/public_html/$fastcgi_script_name;
- include fastcgi_params;
- }
- location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
- expires max;
- log_not_found off;
- root /var/www/dimasrocks.com/public_html/;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement