Answer the question
In order to leave comments, you need to log in
Hosting websites on VPS?
I'm trying to host a website on a VPS, it already has websites. Instead of executing php files are downloaded. Here is the config for my site, Google did not help, although I went through many options. other sites on this vps work fine.
listen 80;
server_name domain.ru www.domain.ru;
root /var/www/domain.ru;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
index index.html index.php;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
Answer the question
In order to leave comments, you need to log in
check the headers, give the correct content type so that the browser understands what to render it
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
index index.html index.php;
}
try to remove this piece of config
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question