Odd behavior
Ken Wright
wizard at bnnorth.net
Wed Oct 9 23:53:44 UTC 2019
On 10/9/19 4:27 AM, Francis Daly wrote:
> On Wed, Oct 09, 2019 at 01:52:11AM -0400, Ken Wright wrote:
>
> When I enter my domain name in Firefox, I get a 404 status.
> Do your nginx logs show this request getting to nginx?
>
> If not, there is something outside of nginx that needs changing first.
I'm sure I'm getting to nginx; the 404 message shows nginx as well.
> Perhaps if you test using "curl", that will eliminate any possibility of
> browser-side caching interfering in your tests.
I tried using curl on both index.html and index.nginx-debian.html and
got identical results for both.
>
> If you can show a (small) config that someone else can use to see the
> issue, perhaps it will be clear what needs to be changed.
Okay, here's the default config:
# Default server configuration
#
upstream php-handler {
server unix:/run/php/php7.2-fpm.sock;
}
server {
if ($host = www.koalatyworks.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = koalatyworks.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name koalatyworks.com www.koalatyworks.com;
# SSL configuration
#
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name koalatyworks.com www.koalatyworks.com;
#
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html index.php;
return 301 https://$host$request_uri;
ssl_certificate
/etc/letsencrypt/live/koalatyworks.com/fullchain.pem; # managed by Certbot
ssl_certificate_key
/etc/letsencrypt/live/koalatyworks.com/privkey.pem; # managed by Certbot
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
}
I hope that helps!
Ken
--
Registered Linux user #483005
If you ever think international relations make sense, remember this:
because a Serb shot an Austrian in Bosnia, Germany invaded Belgium.
More information about the nginx
mailing list