Nginx支持虚拟目录的配置
来源:互联网 发布:软件验收大纲 编辑:程序博客网 时间:2024/04/30 06:43
server {
listen 80;
server_name test.gg;
access_log /var/log/nginx/test.gg.access.log;
location / {
root /data1/my_pro/webroot;
index index.php index.html index.htm;
if (-f $request_filename) {
break;
}
if (!-f $request_filename) {
rewrite ^/(.+)$ /index.php?url=$1 last;
break;
}
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/nginx-default;
}
#=======虚拟目录也支持php
location /pma {
alias /data1/phpmyadmin;
index index.php index.html index.htm;
}
location ~^/pma/.+\.php$ {
root /data1/phpmyadmin;
rewrite /pma/(.*\.php?) /$1 break;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /data1/phpmyadmin$fastcgi_script_name;
}
#======
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /data1/my_pro/webroot$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache’s document root
# concurs with nginx’s one
#
location ~ /\.ht {
deny all;
}
}
- Nginx支持虚拟目录的配置
- Nginx虚拟目录支持PHP配置
- nginx 配置虚拟目录,并且支持PHP配置虚拟目录
- Nginx发布Alias虚拟目录及PHP支持配置方法
- nginx 配置之 虚拟目录
- 配置Nginx服务器虚拟目录
- linux配置nginx虚拟目录
- tomcat虚拟目录的配置
- Apache虚拟目录的配置
- tomcat虚拟目录的配置
- Tomcat虚拟目录的配置
- Apache虚拟目录的配置
- 虚拟目录6.0的配置
- 配置tomcat的虚拟目录
- 配置tomcat的虚拟目录
- 配置tomcat的虚拟目录
- tomcat虚拟目录的配置
- Tomcat虚拟目录的配置
- PHP: Allowed memory size of、memory_limit 的解决以及更改php.ini配置
- 20.Java XML解析技术
- Error: could not open 'C:/Program Files/Java/jre6/lib/i386/jvm.cfg' 的处理方法
- java.lang.ClassNotFoundException: com.opensymphony.xwork2.util.TextUtils
- Qt的核心剖析:信息隐藏
- Nginx支持虚拟目录的配置
- IDisposable接口详解
- Silverlight动态添加数据模板(以RadGridView为例子)
- 旋转卡壳
- 网络管理
- Sencha Touch 2中如何弹出一个网页并关掉此网页
- boost asio async_write : how to not interleaving async_write calls?
- linux安装小记
- 《爱来不来》观后感