M
M
MSAFT2018-08-01 19:55:01
Nginx
MSAFT, 2018-08-01 19:55:01

How to setup local domain in nginx installed on Ubuntu in Virtualbox?

There is an Ubuntu Server running through the Virtualbox network bridge.
It has a local IP 192.168.1.130 on which localhost can be opened from the machine host without any problems.
You need to add an additional domain such as domain.dev or 192.168.1.130/domaindev with your config, so dropping the folder to the same place where the base domain is already located is not an option. I tried to register servername domain.dev
in the config And in /etc/hosts 192.168.1.130 domain.dev And other variations, but nothing. Who will tell you how to write?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2018-08-02
@freezl

Try this configurator https://nginxconfig.io/
Set your parameters and copy-paste to the nginx settings file (just save the old one first - it won't work as planned). Better yet, create a domain.conf file in the /etc/nginx/conf.d/ directory and copy the section server {}from the configurator into it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question