how can I create a website ?

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

how can I create a website ?

Postby barbq » 28. September 2006 19:10

hello guys

I have downloaded and installed New XAMPP 1.5.4 version Windows using the installer c:\xampp\xampp\
Apache , my sql and fzilla have installed them as services cause that's the way I remember I did it in the past
I have opened port 80 in the firewall ( just this one for the moment to see how it works )

I'm using DynDNS updater and my domain is kbgamers.ath.cx


I went to C:\WINDOWS\system32\drivers\etc opened the file hosts and edited to:
192.0.168.140 localhost
192.0.168.140 kbgamers.ath.cx

I created a folder c:\www\main in which I saved a file index.html just to test if I can see it from outside , but I can't see it.

I have established also a password for the xampp directory and for MySQL Supervisor.

I really don't know how to go further from here. I appreciate any help . Thank you
User avatar
barbq
 
Posts: 23
Joined: 25. March 2006 03:51
Location: HDD

Postby anwoke8204 » 28. September 2006 19:35

the folder that you should save your sites to in your case should be something like c:\xampp\xampp\htdocs\
all site information and sites are saved under the htdocs folder/directory
anwoke8204
 
Posts: 47
Joined: 23. September 2006 02:16

Postby Izzy » 28. September 2006 22:07

anwoke8204 wrote:the folder that you should save your sites to in your case should be something like c:\xampp\xampp\htdocs\
all site information and sites are saved under the htdocs folder/directory
That is indeed true (c:\xampp\xampp\htdocs\www\main) unless you tell Apache the actual path to your web site in the xampp\apache\conf\httpd.conf file or the xampp\apache\conf\extra\httpd-vhosts.conf.

In your case barbq you would need to change the DocumentRoot in the httpd.conf file to "C:/www/main" and then change the <Directory> directive below it to match. The httpd.conf is well commented with explanations for each entry. Make a backup before editing any .conf file and after editing you would need to restart Apache to have your changes take effect.

In more advanced cases you can leave the httpd.conf file at the defaults and create virtual hosts in the extra/httpd-vhosts.conf file. The forums have many posts on this subject. An advantage of this approach is the localhost http://localhost and the XAMPP Welcome pages with all the demos, Security and phpMyAdmin access remain intact and available for testing and usage purposes. IMHO the preferred method.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby barbq » 30. September 2006 02:56

thanks for idea

I've done the following in httpd-vhosts and seems to work

NameVirtualHost 127.0.0.1:80

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

NameVirtualHost 192.168.0.140:80

<VirtualHost 192.168.0.140:80>
ServerName kbgamers.ath.cx
ServerAlias www.kbgamers.ath.cx
DocumentRoot "/www/main/"
<Directory "/www/main/">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

I hope it looks clean and does not threatens my site security or my personal computer security :)

I have run this command apache -S
and I got this results , hopefully it's ok



C:\xampp\xampp\apache\bin>apache -S
VirtualHost configuration:
127.0.0.1:80 is a NameVirtualHost
default server localhost (C:/xampp/xampp/apache/conf/extra/httpd-vhosts
.conf:49)
port 80 namevhost localhost (C:/xampp/xampp/apache/conf/extra/httpd-vho
sts.conf:49)
192.168.0.140:80 is a NameVirtualHost
default server kbgamers.ath.cx (C:/xampp/xampp/apache/conf/extra/httpd-
vhosts.conf:59)
port 80 namevhost kbgamers.ath.cx (C:/xampp/xampp/apache/conf/extra/htt
pd-vhosts.conf:59)
wildcard NameVirtualHosts and _default_ servers:
_default_:443 localhost (C:/xampp/xampp/apache/conf/extra/httpd-ssl.con
f:74)
Syntax OK

thank you again
User avatar
barbq
 
Posts: 23
Joined: 25. March 2006 03:51
Location: HDD

Postby Izzy » 30. September 2006 03:17

Delete this post in case you get even more confused. One riddle is enough to solve in a thread.
Last edited by Izzy on 02. October 2006 05:06, edited 1 time in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby barbq » 01. October 2006 03:16

cause I couldn't get to see my www from outside my LAN I talked to my provider and they told me that my port now it's unblocked which made me think my router doesn't work properly so here I am with a new router trying to make it again work.
Though with the config I had, once I had launched a browser to the domain above mentioned from a different machine from my LAN I was able to see the index.html page, which is what made me think my router has a problem .
I had a D-link DI-704 and now I got myself a LinkSys wireless but I will use it wired.
I have to go again trhough all settings , and cause I'm lazy I reinstalled winxp :)

thanks again :)
User avatar
barbq
 
Posts: 23
Joined: 25. March 2006 03:51
Location: HDD

Postby barbq » 02. October 2006 03:33

ok still can't see my host from outside , any ideas pls

What I did :

installed XAMPP last version with installer in c:\xampp\xampp
created c:\www\main and saved a file here called index.html
I didn't set up passwords, for XAMPP and MYSQL security, cause that's not what I'm interested right now, I just wanna see it from outside.

I setup a static IP for the computer I have the server apache running on 192.168.1.102 accordind to instructions I found on linksys website

" 1. Click on the Start menu, and then click on the Run option.
2. When the “Run” window appears, input control ncpa.cpl into the “Open” field.
3. After the “Network and Dial up Connections” or “Network Connections” window opens, right click on the Local Area Connection or Wireless Network Connection which controls the connection to the router.
4. After the “Local Area Connection Properties” or the “Windows Network Connection Properties” window appears, click on Internet Protocol (TCP/IP) then click on the Properties button.
5. Once the “Internet Protocol (TCP/IP) Properties” window opens, change the option from “Obtain an IP address automatically” to Use the following IP address. Set the options under “Use the following IP address” and “Use the following DNS server addresses” to the following:

* IP: 192.168.1.20 (If there are multiple computers being setup with static IP's, then the next computer would be .25, and next would be .30, etc)
* Subnet Mask: 255.255.255.0
* Default Gateway: 192.168.1.1
* Preferred DNS server: 192.168.1.1
Click OK then OK or Close."

Edit : DNS servers setting here wasn't correct , I had to do it like that
start ... run... typed in cmd.exe , then typed ipconfig /all I wrote all info on a piece of paper and then I set it up correctly :)

hosts file

127.0.0.1 localhost
192.168.1.102 localhost
192.168.1.102 kbgamers.ath.cx

httpd-vhosts file

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

NameVirtualHost *:80

<VirtualHost *:80>
ServerName kbgamers.ath.cx
ServerAlias www.kbgamers.ath.cx
DocumentRoot "C:/www/main"
<Directory "C:/www/main">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

After that I did settings in my linksys router
so I opened port 80 for TCP and UDP for 192.168.1.102
and port 443 for TCP and UDP for 192.168.1.102

am I missing anything ?

oh forgot to say I have disabled windows firewall on my computer hoping this is the problem but it's not windows firewall. I can see the index.html page from my LAN but nothing from outside.
Last edited by barbq on 23. October 2006 12:55, edited 1 time in total.
User avatar
barbq
 
Posts: 23
Joined: 25. March 2006 03:51
Location: HDD

Postby Izzy » 02. October 2006 03:53

The riddler has a few more for you below so I edited out my post.
Last edited by Izzy on 02. October 2006 05:00, edited 1 time in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby Wiedmann » 02. October 2006 04:47

barbq wrote:hosts file

remove the second localhost (or change the name to "mynameis", because that's the name of your pc) and add an entry for www....
Code: Select all
127.0.0.1 localhost
192.168.1.102 mynameis #optional
192.168.1.102 kbgamers.ath.cx
192.168.1.102 www.kbgamers.ath.cx


barbq wrote:httpd-vhosts file

namebased vhosts:
Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
    ServerName kbgamers.ath.cx:80
    ServerAlias www.kbgamers.ath.cx
    DocumentRoot "C:/www/main"
    <Directory "C:/www/main">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

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


or ipbased vhosts:
Code: Select all
<VirtualHost 127.0.0.1:80>
    ServerName localhost:80
    DocumentRoot "C:/xampp/xampp/htdocs"
</VirtualHost>

<VirtualHost 192.168.1.102:80>
    ServerName kbgamers.ath.cx:80
    DocumentRoot "C:/www/main"
    <Directory "C:/www/main">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>


and port 443 for TCP and UDP for 192.168.1.102

Better remove the forwarding for port 443. Or you must change the settings in the ssl config file too. (You need SSL?). And you must only forward TCP, not UDP.

Maybe you must add "Win32DisableAcceptEx" to the file "httpd.conf".

BTW:
The DNS entries (at dyndns) are working correct . Port forwarding on port 443 is also working.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby barbq » 02. October 2006 16:29

Izzy wrote:The riddler has a few more for you below so I edited out my post.




I'll follow Wiedmann instructions
Last edited by barbq on 03. October 2006 16:40, edited 1 time in total.
User avatar
barbq
 
Posts: 23
Joined: 25. March 2006 03:51
Location: HDD

Postby barbq » 02. October 2006 17:26

what I did :

went with kbgamers.ath.cx
router settings : forwarded only port 80 TCP to 192.168.1.102
computer still static IP 192.168.1.102

hosts file

127.0.0.1 localhost
192.168.1.102 mynameis
192.168.1.102 kbgamers.ath.cx
192.168.1.102 www.kbgamers.ath.cx


httpd-vhosts file

NameVirtualHost *:80

<VirtualHost *:80>
ServerName kbgamers.ath.cx:80
ServerAlias www.kbgamers.ath.cx
DocumentRoot "C:/www/main"
<Directory "C:/www/main">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

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


I can see it from another computer on my LAN and asked some friends to try to connect to my http://kbgamers.ath.cx/ and they can't see anything
and now I'm adding Win32DisableAcceptEx in the httpd file. I will boot to see if it works and let you know
User avatar
barbq
 
Posts: 23
Joined: 25. March 2006 03:51
Location: HDD

Postby barbq » 02. October 2006 17:43

still doesn't work :(
User avatar
barbq
 
Posts: 23
Joined: 25. March 2006 03:51
Location: HDD

Postby Wiedmann » 02. October 2006 17:53

Well, all ports are closed at your ip. Check your router settings.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby barbq » 02. October 2006 18:05

ok I've talked to my ISP and I have to change my modem , they say it's not compatible with this service and I gotta exchange it, though to me sounds weird, why a cable modem would stop incoming connections on port 80.. so gotta do this now. I'll be back :)
User avatar
barbq
 
Posts: 23
Joined: 25. March 2006 03:51
Location: HDD

Postby barbq » 02. October 2006 18:07

i just setup my router for 192.168.1.102 as DMZ
User avatar
barbq
 
Posts: 23
Joined: 25. March 2006 03:51
Location: HDD

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 97 guests