systemsdk/docker-nginx-php-laravel

Question: Domain name

Closed this issue · 4 comments

How can I add a domain name? Which will not conflict with local machine 127.0.0.1. Thanks

You need to edit hosts file on your PC + if you have port 80 as non-free - you can edit .env file in the root folder of you app like next (example):
WEB_PORT_HTTP=8080
WEB_PORT_SSL=8043

So, you app will be available like localhost:8080 (after rebuild).

Thanks 👍

@dimadeush If I write the domain name in nginx.conf, other users have to change the domain name in their nginx.conf every time. What is the best way to solve this problem? Thanks

Hello Arthur
I don't know why do you need to change nginx.conf and why do you think that other users have to change it too. Maybe you are solving some your unique issue but I don't know anything about that. If I need to use some domain name and not localhost or 127.0.0.1 - I'm doing it via hosts file for my OS (https://www.hostinger.com/tutorials/wp-content/uploads/sites/2/2016/06/add-ip-address-on-hosts-file.webp).