You are not logged in.
Hi,
I'm wondering whether it is possible to set up some vhosts without a domain, just with the ip my server has?
My httpd-vhosts.conf is looking as follows:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName 188.xxx.xxx.xxx:80
</VirtualHost>
<VirtualHost *:80>
ServerName vhost
DocumentRoot "/srv/http"
ErrorLog "/var/log/httpd/vhost-error_log"
CustomLog "/var/log/httpd/vhost-access_log" common
</VirtualHost>
Unfortunately I only reach the webserver with http://188.xxx.xxx.xxx/, but not with http://vhost.188.xxx.xxx.xxx/. I'm wondering whether this is an error in my configuration or if this isn't possible at all?
Best regards
johnpatcher
Offline
Unfortunately I only reach the webserver with http://188.xxx.xxx.xxx/, but not with http://vhost.188.xxx.xxx.xxx/. I'm wondering whether this is an error in my configuration or if this isn't possible at all?
That isn't possible. You're mixing a domain name with an IP address which just doesn't work.
If it's only for local access/testing, then you can add 'vhost' to your /etc/hosts file to point to 188.xxx.xxx.xxx and then access it just by opening http://vhost
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
<VirtualHost *:80> ServerName vhost DocumentRoot "/srv/http" ErrorLog "/var/log/httpd/vhost-error_log" CustomLog "/var/log/httpd/vhost-access_log" common </VirtualHost>
Unfortunately I only reach the webserver with http://188.xxx.xxx.xxx/, but not with http://vhost.188.xxx.xxx.xxx/
Have you considered using vhost.188.xxx.xxx.xxx as a ServerName instead of just vhost?
Offline
Have you considered using vhost.188.xxx.xxx.xxx as a ServerName instead of just vhost?
It won't work. You can't mix domains/hostnames with IP addresses. The client won't know what to do with it.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Offline
crankyadmin -> yes, that will work, but only any good if the OP is doing local testing, not a public website
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Offline
He wants to do it on a public website.... why does it not have dns?
Home DSL connection?
/me goes and drinks more beer!
Not fair. I only just started work
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Ok, I have DNS working right now, and it works just fine.
Just wondered whether it would also work without, because it took me a while to register and set up this whole domain stuff.
Offline
Just wondered whether it would also work without, because it took me a while to register and set up this whole domain stuff.
Without... what?
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline