Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: Nginx - invalid variable + directive is not allowed here

$
0
0
Some corrections server / locations but the "error nginx: [emerg] invalid variable name in"

user www-data;
worker_processes auto;
pid /run/nginx.pid;

#include /etc/nginx/modules-enabled/*.conf;
# include /etc/nginx/conf.d/*.conf;
#include /etc/nginx/sites-enabled/*;



events {
worker_connections 512;
# multi_accept on;
}

http {
#include /etc/nginx/sites-available/*;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_proxied any;
gzip_types text/plain /html text/css application/x-javascript;
gzip_disable "msie6";

server {

listen 80;
server_name IP_VPS mysite.com www.mysite.com;


location / {
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
try_files $uri $uri/ =404;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_nam$;
include fastcgi_params;
}
}
}

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>