Link to home
Start Free TrialLog in
Avatar of CipherIS
CipherISFlag for United States of America

asked on

Apache - Site Can't be reached

Have a website.  I am trying to create a test website based on the main website to troubleshoot an issue.  I created the site using FileZilla.  I copied the files from the main site "internal.mysite.com" to "internaltest.mysite.com".

I logged into apache and modified the apache.conf file using "sudo nano /etc/apache2/apache2.conf"

Copied below
<VirtualHost *:80>
   DocumentRoot "/home/webserver/www/internal.mysite.com"
   ServerName internal.mysite.com
   <Directory "/home/webserver/www/internal.mysite.com">
       Require ip 172.16.2.0/24
       Require ip 172.16.10.0/24
       Require ip 172.16.20.0/24
       Require ip 10.0.0.0./255.0.0.0
       Require ip 127.0.0.1
   </Directory
</VirtualHost>

Open in new window


To
<VirtualHost *:80>
   DocumentRoot "/home/webserver/www/internaltest.mysite.com"
   ServerName internaltest.mysite.com
   <Directory "/home/webserver/www/internaltest.mysite.com">
       Require ip 172.16.2.0/24
       Require ip 172.16.10.0/24
       Require ip 172.16.20.0/24
       Require ip 10.0.0.0./255.0.0.0
       Require ip 127.0.0.1
   </Directory
</VirtualHost>

Open in new window


Then hit ctrl+x and then Y for save

Restarted server with "sudo service apache2 restart".

Server restarted successfully.

I can access internal.mysite.com but internaltest.mysite.com returns a DNS error -> can’t find the server at internaltest.mysite.com.

I did the exact same steps to a previous site and it works but this one is not.

I also checked the file permissions and ensured that internaltest.mysite.com matched internal.mysite.com.

Any ideas?
Avatar of Jim Riddles
Jim Riddles
Flag of United States of America image

Have you confirmed that DNS is correct?  Do the two domains have the same IP address?
Avatar of CipherIS

ASKER

How do I confirm that?

When I open a command prompt and ping internal.mysite.com it returns IP's it is replying from.

When I ping internaltest.mysite.com it says Ping request could not find host internaltest.mysite.com.  Please check the name and try again.
SOLUTION
Avatar of Jim Riddles
Jim Riddles
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No.  When I did this before I don't remember setting up a DNS entry.  I just went to the server and copied the settings in the file and changed the name which is what I did again.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Only thing i'm obfuscating is mysite, otherwise it is what I'm using.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
How do i find which software is being used for DNS?  Considering attempting with creating a folder in the main site.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Trying to find out.
While i'm trying to figure out the DNS.

I created a folder in the "internal.mysite.com".

The main subfolder that is being used is "items".

I creatd a subfolder "MyTest" and copied what was in "items" to "MyTest".

When I access "internal.mysite.com/MyTest" I receive 404 not found.  

Any idea how to work around this?  If I can get this to work I don't have to create a new site.
Figured out what to do.  Went into the .htaccess and added the "MyTest" there which is giving me the result I want.

Thanks