I'm new in configuring XAMPP and i'm running into a problem that i cant solve. I'm trying to put a site online and it just doesnt happen. I've installed the site correctly on the server (Windows server 2008 running XAMPP).I can run it through localhost and i've also added the following lines to the configuration files:
hosts file:
- Code: Select all
127.0.0.1 localhost
127.0.0.1 MyDomain.com
127.0.0.1 www.MyDomain.com
httpd-vhosts.conf
- Code: Select all
nameVirtualHost *
<VirtualHost *80>
ServerAdmin admin@localhost.com
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
ServerAlias localhost
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost MyDomain.com>
ServerAdmin admin@localhost.com
DocumentRoot "C:/xampp/htdocs/MyDomain.com_new"
ServerName MyDomain.com
ServerAlias MyDomain.com
<Directory "C:/xampp/htdocs/MyDomain.com_new">
Options Indexes FollowSymLinks ExecCGI Includes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Now the problem that i'm ecountering is that if i type MyDomain.com on the local machine everything is fine but when i try to access it through internet i either get "Object not found!" error or in one instance (while trying other similar configurations) the server redirected me to the local path (localhost/mydomain/index.php) rather then to www.mydomain.com/index.php. I've looked through a number of tutorials explaining how to configure a domain on XAMPP and its always the same- edit the hosts file and the virtual hosts file of the apache server and thats it. I'm obviuosly missing something. I'll be greatfull for any suggestions you can offer. Thank you.
I should clarify that the domain name is correctly directed to the server hosting the site. That much i know.