Welcome! Log In Create A New Profile

Advanced

Nginx configuration for multiple servers in folders

Posted by dcaccount 
Nginx configuration for multiple servers in folders
January 18, 2018 09:45AM
I have just installed Nginx on my Raspberry and everything works smoothly.

I have created a basic index.html file and when I connect to my raspi, the web page is displayed correctly. Also php works.

I would like now to create a couple of projects as subdirectory of the /var/www default directory, project automation (/var/www/automation) and project information (/var/www/information), each 3 independent from the other.

So when connecting with the raspiIP (192.168.0.1), I would like to display the main or default website.

Then when connecting to raspiIP/automation, I would like to display the site dedicated to the automation and finally when connecting to rapiIP/information, I would like to display a third web site.

How can I configure nginx to achieve that?

I have tried what explained about Server Blocks (Virtual Hosts) but I have gone nowhere.

Can anyone please help me? Thanks, daniele
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 330
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