<div dir="ltr">Hi I can't access my domain after installing nginx and coinfigurong the default server conf file :<div><div><br></div><div><br><div><div># You may add here your</div><div># server {</div><div>#<span class="" style="white-space:pre">   </span>...</div><div># }</div><div># statements for each of your virtual hosts to this file</div><div><br></div><div>##</div><div># You should look at the following URL's in order to grasp a solid understanding</div><div># of Nginx configuration files in order to fully unleash the power of Nginx.</div><div># <a href="http://wiki.nginx.org/Pitfalls">http://wiki.nginx.org/Pitfalls</a></div><div># <a href="http://wiki.nginx.org/QuickStart">http://wiki.nginx.org/QuickStart</a></div><div># <a href="http://wiki.nginx.org/Configuration">http://wiki.nginx.org/Configuration</a></div><div>#</div><div># Generally, you will want to move this file somewhere, and start with a clean</div><div># file but keep this around for reference. Or just disable in sites-enabled.</div><div>#</div><div># Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.</div><div>##</div><div><br></div><div>server {</div><div><span class="" style="white-space:pre">        </span>listen 80;</div><div><span class="" style="white-space:pre"> </span></div><div><span class="" style="white-space:pre">   </span>server_name www.testmydomain.ovh *.testmydomain.ovh;</div><div><span class="" style="white-space:pre">       </span>root /var/www/testmydomain.ovh/web;</div><div>        access_log /var/www/logs/testmydomain.ovh.access.log;</div><div>        error_log /var/www/logs/testmydomain.ovh.error.log;</div><div><br></div><div><span class="" style="white-space:pre"> </span>index index.php index.html index.htm;</div><div><br></div><div><span class="" style="white-space:pre">     </span>location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {</div><div>    <span class="" style="white-space:pre">  </span>access_log off;</div><div>    <span class="" style="white-space:pre">      </span>expires max;</div><div>  <span class="" style="white-space:pre">    </span>}</div><div><br></div><div><span class="" style="white-space:pre"> </span>location ~ \.php$ {</div><div>    <span class="" style="white-space:pre">  </span>include fastcgi_params;</div><div>    <span class="" style="white-space:pre">      </span>fastcgi_intercept_errors on;</div><div>    <span class="" style="white-space:pre"> </span># By all means use a different server for the fcgi processes if you need to</div><div>    <span class="" style="white-space:pre">  </span>fastcgi_pass unix:/var/run/php5-fpm.sock;</div><div>  <span class="" style="white-space:pre">       </span>}</div><div>}</div><div><br></div><div>server {</div><div><span class="" style="white-space:pre">  </span>listen 80 default_server;</div><div><span class="" style="white-space:pre">  </span>listen [::]:80 default_server ipv6only=on;</div><div><br></div><div><span class="" style="white-space:pre">        </span>root /usr/share/nginx/html;</div><div><span class="" style="white-space:pre">        </span>index index.html index.htm;</div><div><br></div><div><span class="" style="white-space:pre">       </span># Make site accessible from <a href="http://localhost/">http://localhost/</a></div><div><span class="" style="white-space:pre">        </span>server_name localhost;</div><div><br></div><div><span class="" style="white-space:pre">    </span>location / {</div><div><span class="" style="white-space:pre">               </span># First attempt to serve request as file, then</div><div><span class="" style="white-space:pre">             </span># as directory, then fall back to displaying a 404.</div><div><span class="" style="white-space:pre">                </span>try_files $uri $uri/ =404;</div><div><span class="" style="white-space:pre">         </span># Uncomment to enable naxsi on this location</div><div><span class="" style="white-space:pre">               </span># include /etc/nginx/naxsi.rules;</div><div><span class="" style="white-space:pre">  </span>}</div><div><br></div><div><span class="" style="white-space:pre"> </span>#error_page 404 /404.html;</div><div><br></div><div><span class="" style="white-space:pre">        </span># redirect server error pages to the static page /50x.html</div><div><span class="" style="white-space:pre"> </span>#</div><div><span class="" style="white-space:pre">  </span>#error_page 500 502 503 504 /50x.html;</div><div><span class="" style="white-space:pre">     </span>#location = /50x.html {</div><div><span class="" style="white-space:pre">    </span>#<span class="" style="white-space:pre"> </span>root /usr/share/nginx/html;</div><div><span class="" style="white-space:pre">        </span>#}</div><div><br></div><div><span class="" style="white-space:pre">        </span># pass the PHP scripts to FastCGI server listening on <a href="http://127.0.0.1:9000">127.0.0.1:9000</a></div><div><span class="" style="white-space:pre">     </span>#</div><div><span class="" style="white-space:pre">  </span>#location ~ \.php$ {</div><div><span class="" style="white-space:pre">       </span>#<span class="" style="white-space:pre"> </span>fastcgi_split_path_info ^(.+\.php)(/.+)$;</div><div><span class="" style="white-space:pre">  </span>#<span class="" style="white-space:pre"> </span># NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini</div><div><span class="" style="white-space:pre">       </span>#</div><div><span class="" style="white-space:pre">  </span>#<span class="" style="white-space:pre"> </span># With php5-cgi alone:</div><div><span class="" style="white-space:pre">     </span>#<span class="" style="white-space:pre"> </span>fastcgi_pass <a href="http://127.0.0.1:9000">127.0.0.1:9000</a>;</div><div><span class="" style="white-space:pre">     </span>#<span class="" style="white-space:pre"> </span># With php5-fpm:</div><div><span class="" style="white-space:pre">   </span>#<span class="" style="white-space:pre"> </span>fastcgi_pass unix:/var/run/php5-fpm.sock;</div><div><span class="" style="white-space:pre">  </span>#<span class="" style="white-space:pre"> </span>fastcgi_index index.php;</div><div><span class="" style="white-space:pre">   </span>#<span class="" style="white-space:pre"> </span>include fastcgi_params;</div><div><span class="" style="white-space:pre">    </span>#}</div><div><br></div><div><span class="" style="white-space:pre">        </span># deny access to .htaccess files, if Apache's document root</div><div><span class="" style="white-space:pre">    </span># concurs with nginx's one</div><div><span class="" style="white-space:pre">     </span>#</div><div><span class="" style="white-space:pre">  </span>#location ~ /\.ht {</div><div><span class="" style="white-space:pre">        </span>#<span class="" style="white-space:pre"> </span>deny all;</div><div><span class="" style="white-space:pre">  </span>#}</div><div>}</div><div><br></div><div># another virtual host using mix of IP-, name-, and port-based configuration</div><div>#</div><div>#server {</div><div>#<span class="" style="white-space:pre">    </span>listen 8000;</div><div>#<span class="" style="white-space:pre">      </span>listen somename:8080;</div><div>#<span class="" style="white-space:pre">     </span>server_name somename alias another.alias;</div><div>#<span class="" style="white-space:pre"> </span>root html;</div><div>#<span class="" style="white-space:pre">        </span>index index.html index.htm;</div><div>#</div><div>#<span class="" style="white-space:pre">       </span>location / {</div><div>#<span class="" style="white-space:pre">              </span>try_files $uri $uri/ =404;</div><div>#<span class="" style="white-space:pre">        </span>}</div><div>#}</div><div><br></div><div><br></div><div># HTTPS server</div><div>#</div><div>#server {</div><div>#<span class="" style="white-space:pre"> </span>listen 443;</div><div>#<span class="" style="white-space:pre">       </span>server_name localhost;</div><div>#</div><div>#<span class="" style="white-space:pre">    </span>root html;</div><div>#<span class="" style="white-space:pre">        </span>index index.html index.htm;</div><div>#</div><div>#<span class="" style="white-space:pre">       </span>ssl on;</div><div>#<span class="" style="white-space:pre">   </span>ssl_certificate cert.pem;</div><div>#<span class="" style="white-space:pre"> </span>ssl_certificate_key cert.key;</div><div>#</div><div>#<span class="" style="white-space:pre">     </span>ssl_session_timeout 5m;</div><div>#</div><div>#<span class="" style="white-space:pre">   </span>ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;</div><div>#<span class="" style="white-space:pre">        </span>ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";</div><div>#<span class="" style="white-space:pre">       </span>ssl_prefer_server_ciphers on;</div><div>#</div><div>#<span class="" style="white-space:pre">     </span>location / {</div><div>#<span class="" style="white-space:pre">              </span>try_files $uri $uri/ =404;</div><div>#<span class="" style="white-space:pre">        </span>}</div><div>#}</div></div></div><div><br></div><div>What did I miss here ?</div><div><br></div></div></div>