Answer the question
In order to leave comments, you need to log in
Why does nginx output php as text?
On the server there is such a path to the script /var/www/example/sites/example.com/parser
There is this in nginx.conf
location ~*/parser/ {
root /var/www/example/sites/example.com;
error_log /var/www/example/sites/logs/nginx_error_parser.log;
index index.php;
}
Answer the question
In order to leave comments, you need to log in
location /parser/ {
rewrite ^(.*)$ /parser/index.php permanent;
}
location ~ /parser/.+\.php$ {
error_log /var/www/theinsider/sites/logs/nginx_error_parser.log;
root /var/www/theinsider/sites/theinsider.ua;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_buffers 64 64k;
fastcgi_buffer_size 256k;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
How do you write opening php tags? If a
<?
/*Code*/
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question