HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Tips/Tricks/Mods (
-   -   Webspace reachable on server's IP (

manarak 1st September 2009 15:11

Webspace reachable on server's IP
Don't jump to conclusions, read the whole post!

Here is the current state of the server:

Debian 5 + ISPConfig 3
The server hosts domains with websites.
Everything works as in a standard ISPC3 installation (webmail, phpmyadmin, etc.)
Currently, if one enters the server's IP into the URL field of a browser, it displays "it works!"

What I would like to achieve:

I would like to setup a website on the server's IP while keeping the hosted domains functional.

Horfic 1st September 2009 16:16

you check your /etc/hosts file. There should be something in it like server1

This should do the trick when the is the same domain like the one you want to display on the ip address

PS: You can look at the setup instructions under network configuration starting with the /etc/hosts

manarak 1st September 2009 20:09

Hi, Thanks, but I'm not sure I understand.

You talk about a domain, I just want to display a website.

for example, when the IP is called from a browser, the file index.php will be displayed as

Horfic 1st September 2009 20:15

Sorry, my fault. Then you just change the html file with "it works" to something else! You can find this file under /var/www/index.html

Have fun!

manarak 1st September 2009 20:32

ok, is there any way to get it to serve the contents of a var/www/clients/clientXY/webXY/web folder?

astewart 1st September 2009 21:18


Originally Posted by manarak (Post 202858)
ok, is there any way to get it to serve the contents of a var/www/clients/clientXY/webXY/web folder?

What you can do is create a symlink of the file that you already have in one of your web directories, eg:


user@server:/var/www# ln -s /var/www/ ./index.php
Unfortunitely with this method all Style / CSS is gone and modifications would need to be made to the index file to reflect the whole URL path for most objects / links.

Play around with it and see what you can figure out.

manarak 1st September 2009 21:50

any way to make /var/www/clients/clientXY/webXY/web/ the webroot for ?

(I'm trying to reproduce something I had on my old server running on Plesk)

astewart 1st September 2009 23:11

It is the main webroot I think.

Like I mentioned, I have a site now reachable at just the IP. There was some customizations that needed to be done to the index.php file(s) but it works fine.

Check out my previous post.

Unless you mean something totally different, I'm unsure then.

manarak 1st September 2009 23:39

well, if t was webroot, then modifications to your index.php should not have been necessary and style/css etc. wouldn't be lost.

also, if an image is put in that same directory, it should be displayed using just src=image.jpg, without adding any paths

astewart 2nd September 2009 03:32

ah, I gotcha now.

For that you will have to change the default web root set in apache I think. I'm unsure what file exactly sets your web root but the problem with this is that once you update ISPCONFIG, it will overwrite your changes.

So you will be better off modifying the proper ISPCONFIG file that sets the web root in apache I guess.

Sorry can't help you there. :(

All times are GMT +2. The time now is 03:20.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.