Answer the question
In order to leave comments, you need to log in
Server_name does not work in nginx config. How to fix?
Hello!
I use docker for local development in the nginx + php-fpm + apache bundle. I decided to give up Apache, created such a simple nginx config:
server {
listen 80 default_server;
deny all;
}
server {
listen 80;
server_name test-73.dev;
root /var/www/html/test-73.dev;
location / {
index index.php index.html index.htm;
}
location ~* \.php$ {
fastcgi_index index.php;
fastcgi_pass php:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
}
Answer the question
In order to leave comments, you need to log in
Don't use the .dev domain. Forced https is hardcoded for it in all browsers.
Well, or configure the server to work on https
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question