This is my nginx.conf file.
#user nobody;worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid;events {worker_connections 1024;} HTTP {include 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 Logs/access.log Main; Sendfile on; #tcp_nopush on; #keepalive_timeout 0; Keepalive_timeout 65; #gzip on; server {Listen 81; server_name www.test.com; Root D:/src/web/runroot; Error_page 404/404.html; Error_page 502 503 504/50x.html; if ($remote _addr!~ "123.125.169.174") {# rewrite ^ Http://lavaradio.wix.com/lavaradio redirect; } rewrite ^/api/(. *?) \.json$/index.php?route=api/$1&Amp;_of=json break; if (!-f $request _filename) {rewrite ^/(. *?) $/index.php?route=$1 Last; } location/index.php {Fastcgi_pass 127.0.0.1:9000; Fastcgi_index index.php; Fastcgi_param script_filename $document _root$fastcgi_script_name; Include Fastcgi_params; } } }
I'm already in C:\Windows\System32\drivers\etc\hosts.
127.0.0.1 www.test.com
With 127.0.0.1:81 can be accessed using www.test.com directly is "Unable to display this page"
Reply to discussion (solution)
Big Brother, you have to add a port number, okay!
www.test.com:81
If you don't serve something the slogan, change 81 to 80.
The default is 80 port, you change to 81 will add port OH
And www.test.com is not your real domain name, you have to add in the local Hosts file
192.168.1.100 www.test.com
192.168.1.100 is the IP of your nginx server.
Use Phpfind directly, there is no need to waste time on the configuration