Welcome! Log In Create A New Profile

Advanced

How to host multiple sites locally at different addresses

Posted by nickednamed 
How to host multiple sites locally at different addresses
November 04, 2016 04:56AM
Hi all,

I'm trying to host a few different sites locally, on my laptop, for testing purposes (EG Moodle, Wordpress, Composr CMS, etc.)

I would like to have each website located at "localhost/website" or something similar.

At the moment I have one website (moodle) which I can access by navigating to "localhost" in my browser.

I've read the documentation, and experimented with the nginx config files, but so far, I have not managed to move my moodle installation from "localhost" to "localhost/moodle".

Can anyone please point me in the right direction?
Re: How to host multiple sites locally at different addresses
November 20, 2016 06:39AM
It seems pretty clear after looking at a vhost file that what you need to play with is the root directory. Check this: http://nginx.org/en/docs/beginners_guide.html

location / {
root /data/www;
}

that should et you started.



Edited 2 time(s). Last edit at 11/20/2016 06:40AM by ovidiu.
Re: How to host multiple sites locally at different addresses
November 25, 2016 05:05AM
Problem solved! Thank you. I was sure I had tried that - but I must have done it wrong.

Changing

location / {
root /data/www/moodle;
}

to

location / {
root /data/www;
}

and updating my moodle configuration file fixed my issue.

Thank you again.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 150
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready