0

Hello guys, i already have my databases and scripts working, and i was implementing a small webserver under windows 7 with xampp.

But after configuring all needed in apache, i can see the pages in the server but non of the clients can see the pages. No error is displayed, just a message saying Internet Explorer cannot display the webpage

Httpd-vhosts.conf:

<VirtualHost *:80>
        ServerAdmin joao.dias@centralcervejas.pt
        DocumentRoot "C:/xampp/htdocs/ad/adtable"
        ServerName kadar
        ServerAlias www.kadar
       <Directory "C:/xampp/htdocs/ad/adtable/" >
                Options Indexes FollowSymLinks ExecCGI Includes
                Order allow,deny
                Allow from all
            </Directory>  
    </VirtualHost>
    <VirtualHost *:80>
        ServerAdmin joao.dias@centralcervejas.pt
        DocumentRoot "C:/xampp/htdocs"
        ServerName vendas
        ServerAlias www.vendas
       <Directory "C:/xampp/htdocs/" >
                Options Indexes FollowSymLinks ExecCGI Includes
                Order allow,deny
                Allow from all
            </Directory>  
    </VirtualHost>

Windows hosts file:

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost
10.5.135.75       kadar
10.5.135.75       vendas

The server ip is 10.5.135.75
if i access via 10.5.135.75 i cann access the kadar virtualhost
If i access via kadar i get message: Internet Explorer cannot display the webpage
If i access via vendas i get message: Internet Explorer cannot display the webpage
Already rebooted windows 3 times and apache server several times, with no luck

What am i doing wrong?

3
Contributors
5
Replies
23
Views
3 Years
Discussion Span
Last Post by cereal
0

Hmm, have you tried with another browser? The message can be due to an encoding problem of the page, it is not sure it's related to the server settings. Can you telnet from the clients to 10.5.135.75 80:

telnet 10.5.135.75 80
GET / HTTP/1.1

And then send two returns, if you can connect repeat with the domain name:

telnet kadar 80
GET / HTTP/1.1

Or 1.0 in case you get 400 bad request. It should return the index page. Otherwise post the response here.

Edited by cereal

0

I have tried in IE9/IE8/Google Browser/Firefox.
If i acesss via IP it works ok, but the virtualhosts only work inside the server. thats strange.

0

The hosts file of the server should point to 127.0.0.1, each client hosts file to the remote IP, i.e. to 10.5.135.75. If this is the setting and there is no firewall blocking port 80 on the server, try the telnets commands and let us know the results. You can also include the error and access logs into the virtual hosts, so you can register these activities on the server, as example:

<VirtualHost *:80>
    ServerAdmin joao.dias@centralcervejas.pt
    DocumentRoot "C:/xampp/htdocs/ad/adtable"
    ServerName kadar
    ServerAlias www.kadar

    ErrorLog ${APACHE_LOG_DIR}/kadar_error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel debug

    CustomLog ${APACHE_LOG_DIR}/kadar_access.log combined

    <Directory "C:/xampp/htdocs/ad/adtable/" >
        Options Indexes FollowSymLinks ExecCGI Includes
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

Edited by cereal

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.