Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: New Server Problem, Help would be appreciated. |
|
Author |
|
nob4uask
Joined: 19 Aug 2010 Posts: 15
|
Posted: Sun 28 Nov '10 8:08 Post subject: New Server Problem, Help would be appreciated. |
|
|
Arvo All,
About 5 months ago I installed Apache on my home computer so that I can host a private website which has been up and running fine. I decided to purchase another PC to use as a dedicated server and business use while keeping the old one for playing around with. I installed Apache 2.2 and the rest of my software and have the site working fine using localhost. But when I shut down the server on the old PC I can't access it from the real world, even using the ISP address. Below are the details and any help would be greatly appreciated.
Both PC's are running XP
I am using a cisco cable modem/router
I used the same httpd configuration in both PC's (Port Related Settings).
I opened the port I am using in the firewall of the new Server.
I use dyndns to define my url.
After dealing with this whole issue it made me wonder how a request for the site knew which pc to go to before? The new server couldn't even access the HD that the site was on because I haven't shared the drive yet. So it must of gone through the net and accessed the port & site through the old Server but both PC's used the same IP Address. How did it know which one to go to ?
I have one other issue that isn't related to the above. I installed phpMyAdmin to allow me to access my mySQL database. Now, in order to run this I have to access it like a site. Do I have to edit the httpd file and set it up like 2 different sites ?
Once again, appreciate any help that you can give me. |
|
Back to top |
|
nob4uask
Joined: 19 Aug 2010 Posts: 15
|
Posted: Sun 28 Nov '10 13:51 Post subject: |
|
|
Even All,
Solved the first part. It was as simple as changing the internal IP address of the new server in the port forwarding of the router. If anyone could help me with the 2nd part it would be appreciated.
I have one other issue that isn't related to the above. I installed phpMyAdmin to allow me to access my mySQL database. Now, in order to run this I have to access it like a site. Do I have to edit the httpd file and set it up like 2 different sites ? |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Sun 28 Nov '10 18:41 Post subject: |
|
|
No, you do not have to, you could put it in a password protected directory on the one site. I wouldn't suggest it unless it is the only option you had. I can probably look through my logs and find a scan that was searching for phpmyadmin among other things.
I would however suggest making a second site, and using host files inhouse to give it a url like http://my.phpadmin and then as a second layer of protection allowing only LAN IPs of machines inhouse access that you wish to access it from.
When you add this second site, just remember your first virtual host must be a duplicate of the one you have right now, then you start adding any others. |
|
Back to top |
|
nob4uask
Joined: 19 Aug 2010 Posts: 15
|
Posted: Sun 28 Nov '10 22:38 Post subject: |
|
|
glsmith wrote: | No, you do not have to, you could put it in a password protected directory on the one site. I wouldn't suggest it unless it is the only option you had. I can probably look through my logs and find a scan that was searching for phpmyadmin among other things.
I would however suggest making a second site, and using host files inhouse to give it a url like http://my.phpadmin and then as a second layer of protection allowing only LAN IPs of machines inhouse access that you wish to access it from.
When you add this second site, just remember your first virtual host must be a duplicate of the one you have right now, then you start adding any others. |
Morn gls,
Hope all has been ok on the homefront for yourself.
Appreciate the input, I will go with what you recommend although it will probably take me a week or 2 to decipher..lol
Will post if I have problems and thank you for your help. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Mon 29 Nov '10 10:58 Post subject: |
|
|
A little more help then;
host file
C:\Windows\system32\drivers\etc\hosts <- no file extension.
if you are on Vista and beyond, you will have to run your editor as Administrator. Then add
127.0.0.1 my.phpadmin
-------------------------------------------------------------------
apacheroot/conf/extra/httpd-vhosts.conf
NameVirtualHosts *:80
<VirtualHost _default_:80>
DocumentRoot "/same/as/in/httpd.conf"
</VirtualHost>
# Add additional VirtualHosts below
<VirtualHost *:80>
Servername my.phpadmin
DocumentRoot /path/to/phpmyadmin
...
# for every docroot there must be a <Directory> to go with it
<Directory "/path/to/phpmyadmin">
Option whatever
AllowOverride whatever
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
</VirtualHost>
-------------------------------------------------------------------
apacheroot/conf/httpd.conf
uncomment the Include line pointing to the vhosts file
Include conf/extra/httpd-vhosts.conf
restart, test http://my.phpadmin
That's pretty much too much help
and the ... just means anything else you want to put in there that is allowed in the VHost container. Do not actually add the three dots
The reason the one is bold is because it must be first, must be the same documentroot as is in httpd.conf or it will not work as you expect it to. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Thu 02 Dec '10 13:38 Post subject: |
|
|
A perfect example of a scan for phpmyadmin that I was speaking of. This scan was over 100 requests.
[Wed Dec 01 12:38:05.728500 2010] [core:error] [pid 3060:tid 840] [client 213.131.227.110:42599] File does not exist: C:/home/apachehaus/public_html/phpmyadmin
[Wed Dec 01 12:38:06.212875 2010] [core:error] [pid 3060:tid 880] [client 213.131.227.110:42842] File does not exist: C:/home/apachehaus/public_html/phpMyAdmin
[Wed Dec 01 12:38:06.697250 2010] [core:error] [pid 3060:tid 936] [client 213.131.227.110:43114] File does not exist: C:/home/apachehaus/public_html/phpMyAdmin-2
[Wed Dec 01 12:38:07.166000 2010] [core:error] [pid 3060:tid 940] [client 213.131.227.110:43357] File does not exist: C:/home/apachehaus/public_html/php-my-admin
[Wed Dec 01 12:38:07.634750 2010] [core:error] [pid 3060:tid 1020] [client 213.131.227.110:43604] File does not exist: C:/home/apachehaus/public_html/phpMyAdmin-2.2.3 |
|
Back to top |
|
|
|
|
|
|