Laravel forge NGINX config for wave
Can anyone help with the proper nginx config for wave with laravel forge. Cannot access the admin or any of the assets.
Hi there,
What I would suggest here is updating your APP_URL to match your domain name exactly. This should fix the issue with the static files not being loaded.
Let me know how it goes!
Hey Bobby, The APP_URL was updated as soon as I put it on forge.
Hi there,
Would you mind sharing the current Nginx config that you are using?
Wave is based on Laravel and Voayger and it should work with the standard Nginx serevr block for Laravel.
Here is the one that I usually use for my Laravel projects:
https://github.com/bobbyiliev/laravel-nginx-server-block/blob/master/laravel-nginx-server-block
Hey Bobby, Here is the server block, its being hosted on digital ocean with forge.
# FORGE CONFIG (DO NOT REMOVE!)
include forge-conf/dev.asanapeeps.com/before/*;
server {
listen 80;
listen [::]:80;
server_name dev.asanapeeps.com;
server_tokens off;
root /home/forge/dev.asanapeeps.com/public;
# FORGE SSL (DO NOT REMOVE!)
# ssl_certificate;
# ssl_certificate_key;
ssl_protocols TLSv1.2;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/dhparams.pem;
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;
# FORGE CONFIG (DO NOT REMOVE!)
include forge-conf/dev.asanapeeps.com/server/*;
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; }
access_log off;
error_log /var/log/nginx/dev.asanapeeps.com-error.log error;
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
# FORGE CONFIG (DO NOT REMOVE!)
include forge-conf/dev.asanapeeps.com/after/*;
Hey Cory,
It looks like the assets are not being linked correctly. Have you run the following command on your server:
php artisan storage:link
This will create the symlink folder for your assets and images. I'm pretty sure that should solve your issue, but if not let me know and I can take a look into it further ;)















