Selamat sore, saya mengalami kendala saat ingin melakukan rewrite pada nginx.conf. Berikut ini code yang saya masukan
server {
listen 80;
server_name 1ori.com;
location / {
try_files $uri $uri.html $uri/ @extensionless-php;
index index.html index.htm index.php;
}
location ~ \.php$ {
try_files $uri =404;
}
location @extensionless-php {
rewrite ^(.*)$ $1.php last;
}
}
saat coba restart nginx untuk apply nginx.conf malah dapet error conflicting server name.
Stopping nginx: [ OK ]
Starting nginx: nginx: [warn] conflicting server name "1ori.com" on 0.0.0.0:80, ignored
[ OK ]
Mohon bantuannya pak MR. Thank you