Question

How can I make multiple local ip address on one server with nginx vhosts? FreeBSD

My FreeBSD server ip is 10.0.0.10 and I want to make my websites running as the following

wordpress website on 10.0.0.11 drupal website on 10.0.0.12 mediawiki website on 10.0.0.13

Is it possible to do this? Can anyone point me in the right direction?

I use FreeBSD and Nginx. Thank you!


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

jarland
DigitalOcean Employee
DigitalOcean Employee badge
April 30, 2019
Accepted Answer

Greetings!

I’m not sure if this is the best path, because I’m not completely following on the use case, but I found an article that may be helpful: https://www.transip.eu/knowledgebase/entry/156-configuring-internal-ip-addresses-linux-vps/

Since we use 10. ranges for our private networking, I recommend using something like 192.168 ranges to avoid any future conflicts.

In my experience when anyone hosts websites on individual IP addresses on the system, they use a container setup that generally manages internal IPs for them and thus may make it inappropriate to use the technique I linked. If not using containers, it may make more sense to simply use virtual hosts as they were intended to be used - by name direct to content. If you have an individual service listening for each website on it’s own internal IP, you’re likely wasting resources by creating multiple instances of an application that is capable of handling all requests under one instance.

Jarland

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.