Access from outside but not from inside network

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

Access from outside but not from inside network

Postby Tcchap » 26. September 2006 18:53

I have installed XAMPP to host MOODLE, which is an open source course management software. Anyway, my school district set me up with an external ip number so that teachers could access the server from outside the network. This works fine, the problem is that we can't access the server from inside the network. I was just wondering if it is a tech issue with our network admins or if it is a config issue with my apache config files. Anyone have any ideas? Thanks.
Tcchap
 
Posts: 3
Joined: 26. September 2006 18:38

Postby Izzy » 27. September 2006 00:37

There are some issues with configuration of your network to allow a server to use it.

With little to go on you may find this link worth a read as the original poster had what may be a similar issue:
http://community.apachefriends.org/f/viewtopi ... 4230#84230
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Thanks Izzy

Postby Tcchap » 27. September 2006 12:13

Thanks Izzy,

I had read that post and tried thisL

NameVirtualHost 192.168.1.1
NameVirtualHost 172.20.30.40

<VirtualHost 192.168.1.1 172.20.30.40>

DocumentRoot /www/server1
ServerName server.example.com
ServerAlias server

</VirtualHost>

I am a little familiar with the config file but I tried it and no luck. Let me see if I have this straight. My external ip is 168.... and my internal is 10.....

I used the 168 number for ServerName in the config file so what should be the ServerAlias? Should it be the 10... IP. When I read that post yesterday, I thought that it sounded like my situation. My problem is that I am a newbie and this stuff is difficult for me. I have made it this far though and I will get it done. I will try to get some more specific information from my tech director to see if I can describe our situation a little more clearly. Thanks for the reply.
Tcchap
 
Posts: 3
Joined: 26. September 2006 18:38

Postby Izzy » 27. September 2006 13:02

Just as an example of what your xampp\apache\conf\extra\httpd-vhosts.conf file might look like:
Code: Select all
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot "C:/xampp/xampp/htdocs"
</VirtualHost>

NameVirtualHost 10.10.10.1
NameVirtualHost 168.168.168.168

<VirtualHost 10.10.10.1 168.168.168.168>
ServerName domain.name
ServerAlias www.domain.name
DocumentRoot "C:/xampp/xampp/htdocs//www/server1"
ServerAdmin webmaster@domain.name
<Directory "C:/xampp/xampp/htdocs//www/server1">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog logs/domainname.log
CustomLog logs/domainname.log common
</VirtualHost>

Of course the paths will be your actual paths and the names and IPs will be your actual IPs.

Don't forget to restart apache when making changes to conf files and always backup the conf files before editing.

Make sure the network administrator has allowed the ports required for your server on your local network to be opened.

Your windows host file:
C:\Windows\system32\drivers\etc\hosts
should also be edited, by dragging into your text editor, with for example:
127.0.0.1 localhost
10.10.10.10 domain.name
Save As hosts
Done.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 58 guests