nginx配置如下 user www www;
server
{ listen 8080;
server_name localhost
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/ts.mimangba.com;
set $wwwroot /home/wwwroot/ts.mimangba.com;
location / {
root $wwwroot;
index index.html index.htm index.php;
rewrite ^/$ /index.php last;
rewrite ^/(?!index\.php|robots\.txt|static)(.*)$ /index.php/$1 last;
}
location ~ ^(.+\.php)(.*)$ {
root $wwwroot;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass unix:/tmp/php-cgi.sock;
include fcgi.conf;
}
}有文件/home/wwwroot/ts.mimangba.com;下info.php 用http://localhost:8080/info.php报404
server
{ listen 8080;
server_name localhost
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/ts.mimangba.com;
set $wwwroot /home/wwwroot/ts.mimangba.com;
location / {
root $wwwroot;
index index.html index.htm index.php;
rewrite ^/$ /index.php last;
rewrite ^/(?!index\.php|robots\.txt|static)(.*)$ /index.php/$1 last;
}
location ~ ^(.+\.php)(.*)$ {
root $wwwroot;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass unix:/tmp/php-cgi.sock;
include fcgi.conf;
}
}有文件/home/wwwroot/ts.mimangba.com;下info.php 用http://localhost:8080/info.php报404
解决方案 »
- 可以分国家/地区统计网站流量
- linux+ php 环境下有什么的报表?
- zend 7.1格式化问题
- js 载入时 选中某段文字火狐里面不兼容怎么办
- MySQL底层 改为 MS SQL
- php最拿手,请大家给点建议去哪个公司实习?
- ORACLE字符集编码问题
- 求个类似的样板???
- 关于帝国cms中的一个挺另人恶心的事
- 怎样在a.php用iframe插入b.php并隐藏url
- imagecreatefrompng频繁调用Warning: imagecreatefrompng(): Cannot read image data
- discuz在更改新模板以后,发布文章的页面样式没有了,请问下怎么解决?
吧你要单独显示的页面都添加到这里面
什么叫单独显示的页面?我写的info.php只是测试的,原来有个phpmyadmin的数据管理,本来好好的,不知道动了哪里了,显示访问所有的页面都报404,但页面是确实存在的
server
{ listen 8080;
server_name localhost
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/ts.mimangba.com;
set $wwwroot /home/wwwroot/ts.mimangba.com;
location / {
root $wwwroot;
index index.html index.htm index.php;
rewrite ^/$ /index.php last;
rewrite ^/(?!index\.php|robots\.txt|static)(.*)$ /index.php/$ last;
}
location ~ ^(.+\.php)(.*)$ {
root $wwwroot;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass unix:/tmp/php-cgi.sock;
include fcgi.conf;
}
}