Answer the question
In order to leave comments, you need to log in
Need help with a simple nginx regex?
Guys, help, plz, with a simple nginx config?
I have this config now:
server {
listen 80;
server_name domain.com;
root /home/www/domain.com;
access_log /var/log/nginx/domain.com.access.log main;
error_log /var/log/nginx/domain.com.error.log;
location / {
root /home/www/domain.com;
index index.php;
}
location ~* \.(JPG|jpg|jpeg|png|css|gif|js|ico)$ {
root /home/www/domain.com;
expires 1d;
access_log off;
}
location /ab/account/ {
try_files $uri $uri/ =404;
auth_basic "Restricted Content";
auth_basic_user_file /etc/nginx/passwd;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
location ~* o1=mm {
proxy_pass http://domain2.com;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question