shawnyv
266
7
Servers

Help with nginx & serving internal app

Posted 1 month ago by shawnyv

Hi all,

I'm trying to get a laravel app set up for a client on their internal network (no access from outside world).

This is the first time I've had to do any server management stuff outside Forge, and it definitely paints a compelling picture why I never want to work without forge!

I've followed this tutorial to get my app set up on the new server, and it's worked beautifully, EXCEPT that I can't figure out how to actually get it to load in the browser (all my commands are working fine though).

https://medium.com/@grmcameron/deploying-your-laravel-web-app-1faaa66f3302

I'm sure there's something simple I'm missing between my sites-available files (and maybe the /etc/hosts ?), but I can't for the life of me figure it out, and all my googling to this point hasn't helped.

I'd like the site to load either with the server IP, OR with an alias that can be accessed by any connection that has permissions to see it (IE me when I'm VPN'd into the remote server).

EG: I'd love either http://123.45.67 or http://my_pretty_name.com to work (without having to link my_pretty_name.com, of course)

I've tried various combinations of server_names in the available-sites file(s) to no avail... EG:

''' listen 80 default_server; listen [::]:80 default_server;

    root /var/www/mySiteDir/public;

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

    #server_name _;
    server_name mySiteIp;

'''

Any help would be much appreciated

Please sign in or create an account to participate in this conversation.