阿里云服务器 centos7
通过wdcp 安装的 nginx+apache ThinkPHP 3.2.3
问题: 通过wdcp 关闭nginx ,整个网站都可以访问。但开启 nginx+apache 后,
仅仅主页面可以访问,比如 www.abc.com 。
所以子页面都访问不了,比如登录页面
http://www.abc.com/index.php/Home/user/login.html显示 404 Not Found
谢谢赐教!
网站根目录 /www/web/default
vim /www/wdlinux/nginx-1.8.1/conf/vhost/abc.com.conf
server {
listen 80;
root /www/web/default;
server_name abc.com;
index index.html index.php index.htm;
error_page 400 /errpage/400.html;
error_page 403 /errpage/403.html;
error_page 404 /errpage/404.html;
error_page 503 /errpage/503.html;
location ~ \.php$ {
proxy_pass
http://127.0.0.1:88; include naproxy.conf;
}
location ~ /\.ht {
deny all;
}
location / {
try_files $uri @apache;
}
location @apache {
proxy_pass
http://127.0.0.1:88; include naproxy.conf;
}
}
apache 虚拟主机配置如下
vim /www/wdlinux/apache/conf/vhost/abc.com.conf
<VirtualHost *:88>
DocumentRoot /www/web/default
ServerName abc.com
ErrorDocument 400 /errpage/400.html
ErrorDocument 403 /errpage/403.html
ErrorDocument 404 /errpage/404.html
ErrorDocument 503 /errpage/503.html
php_admin_value open_basedir /www/web/default:/tmp
<IfModule mod_deflate.c>
DeflateCompressionLevel 7
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php
AddOutputFilter DEFLATE css js html htm gif jpg png bmp php
</IfModule>
</VirtualHost>
<Directory /www/web/default>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
--
FROM 104.172.43.*