Welcome! Log In Create A New Profile

Advanced

Cвязка Nginx+Apache Php файлы скачиваются.

November 05, 2014 09:14AM
Привет всем. Не нашел решения на форуме.
На VPS стоит связка Nginx+Apache. Html файлы отображаются корректно, а php файлы скачиваются с исходным кодом. Подразумеваю, что проблема в том, что nginx не отправляет обработку php файлов на apache, так как при использовании отдельно apache php файлы все таки выполняются.
Подскажите, пожалуйста, что нужно прописать в nginx.conf, чтобы динамика (php файлы) выполнялись через Apache

Файл nginx.conf
[SPOILER]
user apache;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;


events {
worker_connections 1024;
}


http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

#gzip on;

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/vhosts/*/*.conf;
server {
root /var/www/pivovarov93/data/www/website.com;
index index.php index.html index.htm;
server_name website.com;
#disable_symlinks if_not_owner;
listen 80;
include /etc/nginx/vhosts-includes/*.conf;
location ~ \.php$ {
}
location @fallback {
error_log /dev/null crit;
proxy_pass http://127.0.0.1:8080;
proxy_redirect http://127.0.0.1:8080 /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Secret nhpuQyyD1YUs6pAC;
access_log off ;
}
}
}
[/SPOILER]
Subject Author Posted

Cвязка Nginx+Apache Php файлы скачиваются.

pivovarov93 November 05, 2014 09:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 314
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready