Welcome! Log In Create A New Profile

Advanced

Get only default web site

Posted by dan3460 
Get only default web site
July 15, 2021 09:51AM
I have been installing and playing with Nginx for several years and this is the first time that this happened to me.
New installation of Ubuntu, installed PHP 8.0, Mysql and Nginx. Testing each part before i go to the next, here will be a Laravel app running on the server.

I created a new block for the app, made the link restarted nginx but i only get the default web site. In the worldmarket/public is an index.html with a simple greetings.

Here is the block i created:
server {
listen 80;
listen [::]:80;

# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;

root /var/www/worldmarkets/public;

# Add index.php to the list if you are using PHP
index index.php index.html index.htm;

server_name worldmarkets.com www.worldmarkets.com;

location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}

# pass PHP scripts to FastCGI server
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 89
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready