By cyclops
I made a one_click ubuntu LEMP drop, installed composer, installed larval, created a new larval installation, edited /etc/nginx/sites-available/default server section with:
root /home/myUserName/myAppName/public;
index index.php index.html index.htm index.nginx-debian.html;
server_name myIpAddress;
restarted nginx No errors in any of the above. Point my browser to the ip and I still see the DigitalOcean welcome screen rather than Laravel’s. What am I missing?
I’ve read and followed (I think) all the tutorials I can find – any help is greatly appreciated.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
Your Nginx server block for a Laravel application should look as follows:
server {
listen 80;
server_name server_domain_or_IP;
root /var/www/travellist/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
You can follow this step by step tutorial on how to install Laravel with LEMP here:
Alternatively, you can use this 1-Click installation image here:
Here is a step by step tutorial on how to use the 1-Click installation image:
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.