Nginx: Difference between revisions
From Bashlinux
Jump to navigationJump to search
Content deleted Content added
No edit summary |
No edit summary |
||
| Line 24: | Line 24: | ||
} |
} |
||
</nowiki></pre> |
</nowiki></pre> |
||
== svn subfolder == |
|||
Forwarding the svn requests to Apache running on port 81 |
|||
<pre><nowiki> |
|||
location /svn { |
|||
proxy_pass http://localhost:81; |
|||
proxy_set_header X-Real_IP $remote_addr; |
|||
proxy_set_header Host $host; |
|||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|||
} |
|||
</nowiki></pre> |
|||
Revision as of 01:09, 13 March 2010
nginx
phpmyadmin subfolder
On Debian systems, phpmyadmin is installed by default on `/usr/share/phpmyadmin`, so in order to don't break things the recommended configurations is as follows:
location /phpmyadmin {
index index.php;
root /usr/share;
}
location ~ ^/phpmyadmin.+.php$ {
root /usr/share/phpmyadmin;
access_log /var/log/nginx/phpmyadmin.access_log;
error_log /var/log/nginx/phpmyadmin.error_log;
rewrite /phpmyadmin$ /phpmyadmin/index.php;
rewrite ^/phpmyadmin(/.+)$ $1 break;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin/$fastcgi_script_name;
include fastcgi_params;
}
svn subfolder
Forwarding the svn requests to Apache running on port 81
location /svn {
proxy_pass http://localhost:81;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}