On 30 October 2011 19:57, MyName <nginx-forum@nginx.us> wrote:
> server {
> listen 80;
> listen 443;
> return 403;
> server_name domaingue.crots
> www.domaingue.crots
> ;
>
> location / {
> root path/to/html;
> index index.php index.html index.htm;
> }
You need a separate server block for your domain. Example below. You
need to change to match your specific needs (E.G. location for php)
# Default server
server {
listen 80;
listen 443;
return 403;
}
# domaingue.crots server
server {
server_name domaingue.crots www.domaingue.crots;
# Put "root" and "index" directives at the server level
root path/to/html;
index index.php index.html index.htm;
# As many locations as needed
location / {
try_files $uri $uri/ =404;
}
# As many locations as needed
location ~ .+\.php$ {
# Linebelow is important for security
location ~ \..*/.*\.php$ { return 400; }
#proxy_pass/fastcgi_pass etc
}
}
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx