Symfony nginx virtual host -


i have virtual server nginx, symfony project installed in /var/www/test. in /etc/nginx/site-avalible/test.conf create config:

server { server_name test.dev www.test.dev; root /var/www/test/web;  location / {     # try serve file directly, fallback app.php     try_files $uri /app.php$is_args$args; }  location ~ ^/(app_dev|config)\.php(/|$) {     fastcgi_pass unix:/var/run/php5-fpm.sock;     fastcgi_split_path_info ^(.+\.php)(/.*)$;     include fastcgi_params;      fastcgi_param script_filename $realpath_root$fastcgi_script_name;     fastcgi_param document_root $realpath_root; }  location ~ ^/app\.php(/|$) {     fastcgi_pass unix:/var/run/php5-fpm.sock;     fastcgi_split_path_info ^(.+\.php)(/.*)$;     include fastcgi_params;      fastcgi_param script_filename $realpath_root$fastcgi_script_name;     fastcgi_param document_root $realpath_root;      internal; }  location ~ \.php$ {     return 404; }  error_log /var/log/nginx/test_error.log; access_log /var/log/nginx/test_access.log; } 

and create symlink:

ln -s /etc/nginx/sites-available/test.conf /etc/nginx/sites-enabled/test.conf 

and add rules /etc/hosts:

127.0.0.1       test.dev 

this done in server. know ip of virtual server , create in local computer in /etc/hosts:

82.91.183.61    test.dev 

and try open in browser have 502 error, why? , how can correct virtual host config nginx , how open project in local computer if know ip , can create virtual host?


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -