确认几个事情:
1、是否按照官方配置的nginx配置? 麻烦把配置贴出来。
2、查看app.php是不是被删除了? 麻烦把目录结构贴出来
确认几个事情:
1、是否按照官方配置的nginx配置? 麻烦把配置贴出来。
2、查看app.php是不是被删除了? 麻烦把目录结构贴出来
web文件夹下的111.html却能够正常访问
嗯。不过所有的sf下的php你不能正常访问。 因为你没有按照官方配置。
按照下面链接里提到的对nginx进行配置。
好的我试试
server {
listen 80;
server_name edu.51testing.com;
root /home/wwwroot/edu.51testing.com/web;
access_log /usr/local/nginx/logs/edusoho.com.access.log;
error_log /usr/local/nginx/logs/edusoho.com.error.log;location / {
index app.php;
try_files $uri @rewriteapp;
}
location @rewriteapp {
rewrite ^(.*)$ /app.php/$1 last;
}
location ~ ^/udisk {
internal;
root /home/wwwroot/edusoho/app/data/;
}
location ~ ^/(app|app_dev)\.php(/|$) {
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
fastcgi_param HTTP_X-Sendfile-Type X-Accel-Redirect;
fastcgi_param HTTP_X-Accel-Mapping /udisk=/home/wwwroot/edu.51testing.com/app/data/udisk;
fastcgi_buffer_size 128k;
fastcgi_buffers 8 128k;
}
location ~* \.(jpg|jpeg|gif|png|ico|swf)$ {
expires 3y;
access_log off;
gzip off;
}
location ~* \.(css|js)$ {
access_log off;
expires 3y;
}
location ~ ^/files/.*\.(php|php5)$ {
deny all;
}
location ~ \.php$ {
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
}
还是不行呢~帮我看看我这个配置有问题么
/usr/local/nginx/logs/edusoho.com.error.log;
查看一下日志文件,你这个是通过lnmp安装的,有可能会出现差别。
2013/11/20 14:43:47 [error] 3106#0: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message '[ERROR 3070] complex type 'service': The content model is not determinist. (in file:////home/wwwroot/edu.51testing.com/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd - line 75, column 0)
[ERROR 3070] complex type 'argument': The content model is not determinist. (in file:////home/wwwroot/edu.51testing.com/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd - line 133, column 0)
[ERROR 3070] complex type 'call': The content model is not determinist. (in file:////home/wwwroot/edu.51testing.com/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd - line 146, column 0)' in /home/wwwroot/edu.51testing.com/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:90
Stack trace:
#0 /home/wwwroot/edu.51testing.com/vendor/symfony/symfony/sr" while reading response header from upstream, client: 180.168.57.62, server: edu.51testing.com, request: "GET /app.php/ HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "edu.51testing.com"
2013/11/20 14:43:50 [error] 3106#0: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message '[ERROR 3070] complex type 'service': The content model is not determinist. (in file:////home/wwwroot/edu.51testing.com/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd - line 75, column 0)
[ERROR 3070] complex type 'argument': The content model is not determinist. (in file:////home/wwwroot/edu.51testing.com/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd - line 133, column 0)
[ERROR 3070] complex type 'call': The content model is not determinist. (in file:////home/wwwroot/edu.51testing.com/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd - line 146, column 0)' in /home/wwwroot/edu.51testing.com/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:90
Stack trace: