DEV Community

Discussion on: Deploying Your Laravel App on Docker, With NGINX and MySQL

Collapse
 
baliachbryan profile image
Brian Baliach

Hello there Thomas!

If your multiple sites are on different domains, then you need make sure that your server supports cross-origin requests (since these requests are blocked by default by browsers). You can find a very comprehensive tutorial online.

Meanwhile,
Using our nginx server, go to the vhost.conf file we just created, and edit the server_name directive. Modify it to be your domain name and save. At this point, I assume that you have changed your A records and pointed your domain to your server's IP address. Leave the listen port to be 80 (and 443 if you have ssl). Save your configurations and re-create your docker container.