Beginners Guide for XAMPP

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

Postby WorldDrknss » 27. February 2006 22:47

Theres no need to use a dns server to create subdomains, you can do all that use virtualhost inside apache/conf/extra/httpd-vhost.conf

and use www.bluebottle.com for your email.

http://xampptutorials.com
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby Megan » 06. March 2006 20:49

I cant access the localhost site. I've dump my site files in htdocs and the sql and apache is running. I installed xampp again for 2nd time but still not working...

Need help on this..i am totally newbie.

:cry:
Megan
 
Posts: 8
Joined: 06. March 2006 20:18

Postby WorldDrknss » 07. March 2006 03:14

try using a VirtualHost over using the htdocs folder.

http://xampptutorials.com
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby Megan » 07. March 2006 15:42

WorldDrknss wrote:try using a VirtualHost over using the htdocs folder.

http://xampptutorials.com


Ok i will try that thanks,
but how can i delete the first xampp install from c:/Program Files directory. I can't delete it from the directory i get an error and i am not sure how to uninstall it using command line.
Last edited by Megan on 08. March 2006 15:45, edited 1 time in total.
Megan
 
Posts: 8
Joined: 06. March 2006 20:18

Postby WorldDrknss » 08. March 2006 11:21

stop all servers, then go to the control panel and find xampp and uninstall it, when ask do you want to uninstall services choose yes.
:)
http://xampptutorials.com
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby Megan » 08. March 2006 15:27

yes thats the first thing i did but there is no xampp in the control panel, i still cant access the local host from Virtualhost...
what am i doing wrong..i followed all the steps.

I got rid of xampp using command line. I got 10min lesson on commandline and now i've done it :D

Still i cant access my site from localhost.
Megan
 
Posts: 8
Joined: 06. March 2006 20:18

Postby Megan » 08. March 2006 20:38

This is a total headache.

I couldnt get apache to run. I clicked on the Admin button beside the Stop btn for Mysql on the xampp control panel and another page opened up so I pressed the X to exit and now I cant run Sql... :?

I am trying to delete xampp again but I cant since I get an error, I've deleted everything except I cant delete mysqld.exe file.

going crazzzy here...

Need some assistance with this asap.
Megan
 
Posts: 8
Joined: 06. March 2006 20:18

Postby WorldDrknss » 09. March 2006 00:35

Use the VirtualHost Generator at http://xampptutorials.com
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby Megan » 14. March 2006 18:30

First of all I thank you for your prompt replies...

I have another question...if for example the site addresss www.apachefriends.com, would the ServerName be: apachefriends.com

I am confused as to what to put for the servername.

Also the DocumentRoot you put: /srv/www/thegamerslounge

I have my site files filtered in htdocs. So do i put xampp/htdocs/mysite
in the form field?

Pls help

:roll:
Megan
 
Posts: 8
Joined: 06. March 2006 20:18

Postby Megan » 20. March 2006 21:26

Does anyone in this forum have localhost working for them.

I tried everything.

Here is a run down on what i did using xamptutorial.com website.

Step 1:
I configured C:\xampp\apache\conf\extra\httpd-vhost.conf and placed the following virtualhost code to configure the production site:

Code: Select all
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot c:/www/mysite1
ServerName mysite.com
ServerAlias www.mysite1.com
</VirtualHost>

<VirtualHost *:80>
DocumentRoot C:/www/mysite2
ServerName mysite2.com
ServerAlias www.mysite2.com
</VirtualHost>

<VirtualHost *:80>
DocumentRoot C:/xampp/htdocs
ServerName localhost
</VirtualHost>


Notice: i created www folder to place my webfiles of the 2 sites.


Step 2:
Changed Deny to Allow in the httpd.conf

i typed the following http://localhost/mysite.com in IE and
Error returned
Code: Select all
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404
localhost
03/20/06 14:42:54
Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.1


Step 3. As suggested from Worlddrknss on his website to try mod_perl
therefore I downloaded mod_perl and followed the installation instructions but still I am getting error.

I just cant seem to access mysite from locahost...

Pls if there is another step i am missing then let me know. I been trying these things out for almost 2wks now.

I need help :cry:
Thanks.

And one more thing, if u are suggesting virtualhost generator I tried that too...
Megan
 
Posts: 8
Joined: 06. March 2006 20:18

Postby cj_nza » 21. March 2006 10:54

Two things:

1) Virtual host allow you to create a virtual host rather than a subdirectory of an host. The url you supply request a resouce from the mysite.com subdirectory of the host called localhost. The url should be "http://mysite.com" which will allow Apache to serve the files from that virtual host's document root.

2) You have not indicated that you have created an entry that can translate the domain name "mysite.com" to you IP loopback 127.0.0.1
(normally windows\system32\drivers\etc\hosts)
cj_nza
 
Posts: 53
Joined: 06. September 2005 11:49

Postby Megan » 21. March 2006 15:19

cj_nza wrote:Two things:

1) Virtual host allow you to create a virtual host rather than a subdirectory of an host. The url you supply request a resouce from the mysite.com subdirectory of the host called localhost. The url should be "http://mysite.com" which will allow Apache to serve the files from that virtual host's document root.

2) You have not indicated that you have created an entry that can translate the domain name "mysite.com" to you IP loopback 127.0.0.1
(normally windows\system32\drivers\etc\hosts)


1. ok i changed the servername from mysite.com to http://mysite.com. Is this what i type in IE to access localhost? But this is nto really a localhost, for example you can type http://google.com and you will be able to view the site. I am just confused....

2. Can you pls elaborate on this...or simply show me by example how i can do this.

Also since i made all these changes to all these folders, is it neccessary to restart Apache? Everytime i restart it stays on for 1 sec and then it turns off. I have reinstalled xampp for atleast 6x now.
Megan
 
Posts: 8
Joined: 06. March 2006 20:18

Postby cj_nza » 22. March 2006 00:19

It seems that you either don't know what an url is or I am far worse at communicating than I thought, but I defenitly did not ask you to change a servername. In any event it is necessary to retrace some steps.

1) Go back to your Apache config file and change the virtual host names back to the way you had it in your post of 21 March.

2) Restart Apache and make sure it runs.

3) Find a file on you PC called "hosts" normally in the location indicated in my previous post. You should already have the entry for localhost and add the two new domains that you created as below
Code: Select all
127.0.0.1   localhost
127.0.0.1   mysite.com
127.0.0.1   mysite2.com


Then type into IE "http://mysite.com" and you should be served with the page in your C:\www\mysite1 directory.

Don't know if this will help or confuse you further. Windows uses the hosts file to translate a domain name into an IP address. Since you specify that mysite.com and mysite2.com should both be routed to the IP 127.0.0.1 they both become "localhosts". So yes on your machine the url "http://mysite.com" will realy be a connection to a "localhost". "google.com" is not in your host file and when you request "http://google.com" Windows will request a DNS service to translate that into some external IP address so your browser can connect that that IP whatever it is.
cj_nza
 
Posts: 53
Joined: 06. September 2005 11:49

Postby Megan » 22. March 2006 21:37

If i didnt know what url is, then I shouldnt be working with a website lol. I apologize i missed on some words and therefore things seemed a bit confusing.

Anyways, so i've also added the mysite2 to the hosts file just as you have indicated.

As a result when i entered in IE http://mysite.com I got the following warnings:
Code: Select all
Warning: include_once(globals.php) [function.include-once]: failed to open stream: No such file or directory in C:\www\mysite1\index.php on line 29

Warning: include_once() [function.include]: Failed opening 'globals.php' for inclusion (include_path='.;\xampp\php\pear\') in C:\www\mysite1\index.php on line 29

Warning: require_once(/var/www/mysite1.com/includes/version.php) [function.require-once]: failed to open stream: No such file or directory in C:\www\mysite1\includes\mambo.php on line 37

Fatal error: require_once() [function.require]: Failed opening required '/var/www/mysite1.com/includes/version.php' (include_path='.;\xampp\php\pear\') in C:\www\mysite1\includes\mambo.php on line 37
Megan
 
Posts: 8
Joined: 06. March 2006 20:18

Postby WorldDrknss » 23. March 2006 03:41

your path you defined for mambo is incorrects and you will need to change your mambo configuration file to point to the correct path.

you have:
/var/www/mysite1.com/includes/version.php
which should be should be:
/www/mysite1.com/includes/version.php

http://xampptutorials.com

the MOD_PERL is only used if you will be using a VirtualHost similar to what's bellow:

<VirtualHost *:80>
ServerName thegamerslounge.game-host.org
ServerAdmin WorldDrknss@thegamerslounge.game-host.org
ServerAlias www.thegamerslounge.game-host.org
DocumentRoot /srv/www/thegamerslounge
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/srv/www/thegamerslounge">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/srv/www/thegamerslounge">
Options Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddHandler server-parsed .html .htm .shtml .shtm
</Directory>
HostnameLookups Off
ErrorLog /srv/www/thegamerslounge/logs/error_log.txt
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /srv/www/thegamerslounge/logs/access_log.txt combined
ServerSignature On
ScriptAlias /cgi-bin/ "/srv/www/thegamerslounge/cgi-bin/"
<Directory "/srv/www/thegamerslounge/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
DirectoryIndex index.php index.html index.htm index.shtml index.shtm
ErrorDocument 400 /error_pages/400.html
ErrorDocument 403 /error_pages/403.html
ErrorDocument 404 /error_pages/404.html
AccessFileName .htaccess
AddHandler cgi-script .cgi
<IfModule mod_negotiation.so>
<IfModule mod_include.so>
Alias /error/ "/srv/www/thegamerslounge/error/"
<Directory "/srv/www/thegamerslounge/error">
AllowOverride None
Options IncludesNoExec
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en
</Directory>
</IfModule>
</IfModule>
</VirtualHost>
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

PreviousNext

Return to XAMPP for Windows

Who is online

Users browsing this forum: strongbrain2007 and 131 guests