You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by David Blomstrom <da...@yahoo.com> on 2006/07/31 04:30:51 UTC

[users@httpd] Rerouting Localhost (to XAMPP home page)

I'm still struggling with my XAMPP installation. I finally got it downloaded and extracted, but when I starated the installation, everything installed except Apache. I decided to have another look at the default Apache installation. I opened System Preferences > Sharing and discovered that "Personal Web Sharing" was already enabled. Yet I got a dead page when I typed http://localhost into my browser.

So I disabled Personal Web Sharing, the re-enabled it. Now, I get the standard Apache greeting when I type in http://localhost. So I'm getting closer, but http://localhost is supposed to point to my new XAMPP home page.

As I recall, I had a similar problem when I installed XAMPP on my PC, and I solved it by somehow pointing http://localhost to a different page. But I can't remember how I did it.

I think this is XAMPP's home page:

Applications/xampp/htdocs/index.html

When I double click it, it previews at file:///xampp/index.php, but I get a "File not found" error message. I found my httpd.conf file and opened it, but I didn't find any virtual host settings. I did find this line near the end:

#NameVirtualHost *:80

Anyway, do you know how I can make http://localhost point to Applications/xampp/htdocs/index.html ?

Thanks.


 		
---------------------------------
Do you Yahoo!?
 Everyone is raving about the  all-new Yahoo! Mail Beta.

Re: [users@httpd] Rerouting Localhost (to XAMPP home page)

Posted by David Blomstrom <da...@yahoo.com>.

Rob Wilkerson <r....@gmail.com> wrote: You should be able to do this one of two ways:

1.  Change your DocumentRoot directory and the associated 
block to /Applications/xampp/htdocs
2.  Uncomment the NameVirtualHosts directive and create a 
*:80> block that has a DocumentRoot that point to
/Applications/xampp/htdocs

I discovered that DocumentRoot is already set up as you susggested...

DocumentRoot "/Applications/xampp/htdocs"

So I tried the second option, adding this to my httpd.conf file:

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin webguy@mysite.com
    DocumentRoot /Applications/xampp/htdocs
    ServerName dummy-host.example.com
    ErrorLog logs/dummy-host.example.com-error_log
    CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

I then restarted my computer, but nothing changed; http://localhost/ still displays the standard Apache greeting. I was concerned that I might have ruined my httpd.conf file because I'm just learning how to work with it on a Mac, and I've moved, deleted and modified it several times. But the fact that http://localhost indicates it's working, right?

Do I have to substitute something meaningful for the server name? On my PC, my virtual hosts look like this:

<VirtualHost *:80>
ServerName px
ServerAlias px *.px
DocumentRoot C:\sistes\px
</VirtualHost>

So what would be the server name for the example I'm working on now - "etc."?

Thanks.


 			
---------------------------------
See the all-new, redesigned Yahoo.com.  Check it out.

Re: [users@httpd] Rerouting Localhost (to XAMPP home page)

Posted by David Blomstrom <da...@yahoo.com>.
OK, I'll give that a try. Thanks.

Rob Wilkerson <r....@gmail.com> wrote: You should be able to do this one of two ways:

1.  Change your DocumentRoot directory and the associated 
block to /Applications/xampp/htdocs
2.  Uncomment the NameVirtualHosts directive and create a 
*:80> block that has a DocumentRoot that point to
/Applications/xampp/htdocs

You should be able to take a look at the Apache docs and find a pretty
decent amount of information about each of these directives/blocks.

On 7/30/06, David Blomstrom  wrote:
> I'm still struggling with my XAMPP installation. I finally got it downloaded
> and extracted, but when I starated the installation, everything installed
> except Apache. I decided to have another look at the default Apache
> installation. I opened System Preferences > Sharing and discovered that
> "Personal Web Sharing" was already enabled. Yet I got a dead page when I
> typed http://localhost into my browser.
>
> So I disabled Personal Web Sharing, the re-enabled it. Now, I get the
> standard Apache greeting when I type in http://localhost. So I'm getting
> closer, but http://localhost is supposed to point to my new XAMPP home page.
>
> As I recall, I had a similar problem when I installed XAMPP on my PC, and I
> solved it by somehow pointing http://localhost to a different page. But I
> can't remember how I did it.
>
> I think this is XAMPP's home page:
>
> Applications/xampp/htdocs/index.html
>
> When I double click it, it previews at file:///xampp/index.php, but I get a
> "File not found" error message. I found my httpd.conf file and opened it,
> but I didn't find any virtual host settings. I did find this line near the
> end:
>
> #NameVirtualHost *:80
>
> Anyway, do you know how I can make http://localhost point to
> Applications/xampp/htdocs/index.html ?
>
> Thanks.
>
>
>
>  ________________________________
> Do you Yahoo!?
>  Everyone is raving about the all-new Yahoo! Mail Beta.
>
>


-- 

Rob Wilkerson

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See  for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



 		
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates starting at 1ยข/min.

Re: [users@httpd] Rerouting Localhost (to XAMPP home page)

Posted by Rob Wilkerson <r....@gmail.com>.
You should be able to do this one of two ways:

1.  Change your DocumentRoot directory and the associated <Directory>
block to /Applications/xampp/htdocs
2.  Uncomment the NameVirtualHosts directive and create a <VirtualHost
*:80> block that has a DocumentRoot that point to
/Applications/xampp/htdocs

You should be able to take a look at the Apache docs and find a pretty
decent amount of information about each of these directives/blocks.

On 7/30/06, David Blomstrom <da...@yahoo.com> wrote:
> I'm still struggling with my XAMPP installation. I finally got it downloaded
> and extracted, but when I starated the installation, everything installed
> except Apache. I decided to have another look at the default Apache
> installation. I opened System Preferences > Sharing and discovered that
> "Personal Web Sharing" was already enabled. Yet I got a dead page when I
> typed http://localhost into my browser.
>
> So I disabled Personal Web Sharing, the re-enabled it. Now, I get the
> standard Apache greeting when I type in http://localhost. So I'm getting
> closer, but http://localhost is supposed to point to my new XAMPP home page.
>
> As I recall, I had a similar problem when I installed XAMPP on my PC, and I
> solved it by somehow pointing http://localhost to a different page. But I
> can't remember how I did it.
>
> I think this is XAMPP's home page:
>
> Applications/xampp/htdocs/index.html
>
> When I double click it, it previews at file:///xampp/index.php, but I get a
> "File not found" error message. I found my httpd.conf file and opened it,
> but I didn't find any virtual host settings. I did find this line near the
> end:
>
> #NameVirtualHost *:80
>
> Anyway, do you know how I can make http://localhost point to
> Applications/xampp/htdocs/index.html ?
>
> Thanks.
>
>
>
>  ________________________________
> Do you Yahoo!?
>  Everyone is raving about the all-new Yahoo! Mail Beta.
>
>


-- 

Rob Wilkerson

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org