New user of XAMPP local host works, domain doesn't

Problems with the Windows version of XAMPP, questions, comments, and anything related.

New user of XAMPP local host works, domain doesn't

Postby meows » 01. February 2007 00:02

Hi there guys and girls.
I am having a mental breakdown here, seems if I leave the default httpd.conf alone localhost and https://127.0.0.1/xampp/ and php etc all work great.. If I edit it to show my .com domain my domain works fine, however i lose localhost. I did set up httpd-vhosts.conf with this and the default http.conf
# Use name-based virtual hosting.
#
NameVirtualHost 75.160.145.121:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost 75.160.145.121:80>
ServerAdmin meows@techie.com
DocumentRoot /WWW.ROOT.HOME
ServerName 78ez.com
ServerAlias www.78ez.com
ErrorLog com-error_log
CustomLog access_log common
</VirtualHost>

The big question is how do you edit httpd.conf so you get both localhost and your domain to work?
meows
 
Posts: 44
Joined: 31. January 2007 10:28

Postby Wiedmann » 01. February 2007 00:06

If I edit it to show my .com domain my domain works fine, however i lose localhost.

The first vhost must point to your default localhost. And the second vhost is for your .com domain.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby meows » 01. February 2007 00:12

Wiedmann wrote:
If I edit it to show my .com domain my domain works fine, however i lose localhost.

The first vhost must point to your default localhost. And the second vhost is for your .com domain.


I am so brain dead,. how would I write that? use localhost or the IP 127.0.0.1
meows
 
Posts: 44
Joined: 31. January 2007 10:28

Postby Wiedmann » 01. February 2007 00:14

how would I write that?

There are really many examples, which you can fibnd with the search function here ;-)

e.g.:
http://community.apachefriends.org/f/viewtopi ... host#34538
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby meows » 01. February 2007 00:18

The Apache service named reported the following error:
>>> [Wed Jan 31 14:43:41 2007] [warn] NameVirtualHost *:80 has no VirtualHosts .


my VirtualHosts file has this
NameVirtualHost 75.160.145.121:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost 127.0.0.1>
ServerAdmin meows@techie.com
DocumentRoot "F:/Program Files/xampp/htdocs"
ServerName localhost
ServerAlias localhost
## ErrorLog @rel_logfiledir@/dummy-host.example.com-error_log
## CustomLog @rel_logfiledir@/dummy-host.example.com-access_log common
</VirtualHost>


<VirtualHost 75.160.145.121:80>
ServerAdmin meows@techie.com
DocumentRoot /WWW.ROOT.HOME
ServerName 78ez.com
ServerAlias www.78ez.com
ErrorLog com-error_log
CustomLog access_log common
</VirtualHost>

Local host works fine but the domain doesn't work anymore
meows
 
Posts: 44
Joined: 31. January 2007 10:28

Postby Wiedmann » 01. February 2007 00:33

Code: Select all
NameVirtualHost 75.160.145.121:80

<VirtualHost 127.0.0.1>
    ...
</VirtualHost>

<VirtualHost 75.160.145.121:80>
    ...
</VirtualHost>


Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
    ...
</VirtualHost>

<VirtualHost *:80>
    ...
</VirtualHost>
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby meows » 01. February 2007 01:12

used both samples. and got this error
The Apache service named reported the following error:
>>> [Wed Jan 31 14:43:41 2007] [warn] NameVirtualHost *:80 has no VirtualHosts .

For more information, see Help and Support Center at

Hummm.. flustrating.. lets back up here.. what is the procedure to add a domain to XAMPP?
example what do you change in httpd and the http-vhost files.. is there a post you can direct me to? or what is the correct procedure.
Many Many thanks
Christine
meows
 
Posts: 44
Joined: 31. January 2007 10:28

Postby Wiedmann » 01. February 2007 01:28

used both samples.

Both example?

what is the procedure to add a domain to XAMPP?
example what do you change in httpd and the http-vhost files..

I add the code from my link above.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby meows » 01. February 2007 01:33

yes used both examples.. one at a time.. the end result was
NameVirtualHost 75.160.145.121:80

<VirtualHost 127.0.0.1>
ServerAdmin meows@techie.com
DocumentRoot "F:/Program Files/xampp/htdocs"
ServerName localhost
ServerAlias localhost
</VirtualHost>

<VirtualHost 75.160.145.121>
ServerAdmin meows@techie.com
DocumentRoot /WWW.ROOT.HOME
ServerName 78ez.com
ServerAlias www.78ez.com
</VirtualHost>


not sure why it isn't working.. just assume i missed something else..
so that is why i asked the proper procedure to add a domain to the program
meows
 
Posts: 44
Joined: 31. January 2007 10:28

Postby Wiedmann » 01. February 2007 01:36

yes used both examples..

Why both? There is only one example from me here in this thread? *wondering*
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby meows » 01. February 2007 01:43

Wiedmann wrote:
Code: Select all
NameVirtualHost 75.160.145.121:80

<VirtualHost 127.0.0.1>
    ...
</VirtualHost>

<VirtualHost 75.160.145.121:80>
    ...
</VirtualHost>


Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
    ...
</VirtualHost>

<VirtualHost *:80>
    ...
</VirtualHost>


well because it is new and i figured i made a mistake, which surely i have..

can i be pointed in the direction of a how to add a domain, cause i must have messed up somewhere else.
meows
 
Posts: 44
Joined: 31. January 2007 10:28

Postby Wiedmann » 01. February 2007 01:53

Well, the first code, inside the quote, is your own (wrong) code. See your post above.

And the second one is the code you should use.


BTW:
You have read the link i gave you?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby meows » 01. February 2007 06:22

well after spending many more hours reading i came up with this that works.. however it does not find index.htm or index.html in the
DocumentRoot "F:/WWW.ROOT.HOME"
any ideas why this is?
Code: Select all
NameVirtualHost *:80

VirtualHost *:80>
    ServerName localhost:80
    DocumentRoot "F:/Program Files/xampp/htdocs"
    <Directory "F:/Program Files/xampp/htdocs">
        Order Allow,Deny
        Allow from all
        #Options All
        #AllowOverride All
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName www.78ez.com:80
    DocumentRoot "F:/WWW.ROOT.HOME"
    <Directory "F:/WWW.ROOT.HOME">
        Order Allow,Deny
        Allow from all
        #Options All
        #AllowOverride All
    </Directory>
</VirtualHost>
meows
 
Posts: 44
Joined: 31. January 2007 10:28


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 82 guests