nginx.config
upstream app_stat {
server 127.0.0.1:3001;
keepalive 80;
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /home/manish/workspace/statistics;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
access_log /dev/null;
#error_log /var/log/stat-error.log;
# static resources
location ~ ^/(robots.txt|humans.txt|favicon.ico) {
root /home/manish/workspace/statistics;
access_log on;
expires max;
}
location = /favicon.ico {
root /home/manish/workspace;
log_not_found off;
}
location ~ /js/(.*) {
add_header X-debug-message "A static file was served by pushstate";
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://app_stat;
}
location ~ /socket.io/(.*) {
add_header X-debug-message "A static file was served by pushstate";
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://app_stat;
}
location ~ ^/(.+?)(/.*)?$ {
add_header X-debug-message "A static file was served by pushstate";
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://app_stat;
}
location / {
if ($http_user_agent ~ (Googlebot|google|bing|yandex|msnbot|AltaVista|DuckDuckBot) ) {
return 403;
}
add_header X-debug-message $http_accept;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://app_stat;
}
}
# another virtual host using mix of IP-, name-, and port-based configuration
server {
listen 3002;
listen [::]:3002 ipv6only=on;
#root /var/www/wagholigav.com/html;
root /var/www/html/wagholigav/;
index index.php index.htm index.html;
server_name 192.168.1.201:3002;
access_log /dev/null;
location / {
try_files $uri $uri/ =404;
#proxy_pass http://192.168.1.201;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
}
#location ~ [^/]\.php(/|$) {
location ~/.php$ {
#try_files $uri =404;
try_files $uri $uri/ =404;
#proxy_pass http://192.168.1.201;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass unix:/var/run/php5-fpm.sock;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
#include fastcgi.conf;
}
}
index.php в корневом каталоге
index.php в каталоге веб-сайта
home.php
Home
[*]
contact@website.com |
#
City

वाघोली ग्रामस्थ मंडल
Не понимаю, в чем проблема? может кто-нибудь подсказать, где найти/посмотреть? Я прочитал несколько статей/блогов о stackoverflow и Интернете, но так и не нашел никакого решения.
Спасибо.
РЕДАКТИРОВАТЬ 5 ноября 2015 г.:
Теперь я получаю сообщение об ошибке в браузере: «Входной файл не указан», тогда как в моем журнале ошибок nginx есть следующая ошибка:
FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: failed to open stream: Success in Unknown on line 0
Unable to open primary script: [path] (Success)" while reading response header from upstream
и в журнале доступа nginx есть эта ошибка:
GET /index.php HTTP/1.1" 404 56 "-" "Mozilla/5.0 (X11; Linux x86_64)
Подробнее здесь: https://stackoverflow.com/questions/334 ... -executing
Мобильная версия