PDA

View Full Version : NodeWorx control of IP Vhosts


Fr3d
03-23-2010, 07:47 PM
I was replying to another thread (http://interworx.com/forums/showthread.php?t=3098), but then I had an idea (see end of post), so I posted it here to prevent it getting lost.

That's the way apache works. If you have more than one domain on a shared IP address and navigate to http://ip/, it will show the first virtualhost on that domain, specifically this will be the first domain that comes alphabetically. What would you prefer happen instead?

I created a file called a-default.conf in /etc/httpd/conf.d/ and added a <VirtualHost> block for each IP on my server.

(The filename isn't important, but Apache loads all the .conf files in that directory in alphabetical order... you just need to name it something that Apache will load before the file for the first domain.)

The result: http://78.129.202.211/ shows the "Apache 2 Test Page" instead of some user's domain :D

<VirtualHost 78.129.202.211:80>
DocumentRoot /var/www/html
ServerName your.awesome.server.tld
ServerAdmin root@localhost
</VirtualHost>

My idea/feature request:

Perhaps InterWorx could add something like this in a future version, with Vhost blocks added and removed when IP addresses are?

You could just show the default page for the server, show an IWorx splash page (similar to the SiteWorx "new account" page?), or even redirect visitors to a URL of the admin's choice.

And there could be a nice box on the NodeWorx HTTPd page to control all of that ;)

R-n-R
04-02-2010, 01:04 PM
My idea/feature request:

Perhaps InterWorx could add something like this in a future version, with Vhost blocks added and removed when IP addresses are?

You could just show the default page for the server, show an IWorx splash page (similar to the SiteWorx "new account" page?), or even redirect visitors to a URL of the admin's choice.

And there could be a nice box on the NodeWorx HTTPd page to control all of that ;)
I could see this being very useful, especially the URL of admins choice.

m4rk0
09-13-2010, 04:41 AM
[ BUMP ]

Are You working on this problem? :confused:

It would be really nice to have some default Interworx page for "Shared" IP addresses on server!

IWorx-Dan
09-13-2010, 10:57 AM
Hey guys,

The reason it's not inherently built into the system is because, as Fr3d pointed out, the solution is to simply make a primary default config for each IP that gets loaded first alphabetically. I am more then willing to add fr3d's suggestion as a feature request though, but I have to confer with the developers to see if its something they think should be added.

R-n-R
09-13-2010, 11:09 AM
You know I don't even go that far, in regards to messing the the config file that is.

I add a SiteWorx account like 0000.com, load up a simple custom HTML page to that SiteWorx account and that pretty much handles things, as I would like to see it work.

IWorx-Dan
09-13-2010, 12:26 PM
Indeed, that would work too. Good tip Roy!