954,242 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

unable to use domain name directly in browser

Hello
I'm hosting a new website on a LAMP server, with my website folder, monsite.fr, found in the /var/www/ folder. I configured my virtualhost file like this:

vim /etc/apache2/sites-available/monsite


and added the following to the created file:

# Le virtualHost de monsite.fr
<VirtualHost *:80>
    ServerAdmin webmaster@monsite.fr        # L'E-Mail de l'administrateur
    ServerName  monsite.fr                  # L'adresse du site
    ServerAlias www.monsite.fr monsite.com  # Les alias du site
    
    # Les documents du site 
    DocumentRoot /var/www/monsite.fr/
    
    # Les options du site (comme dans un .htaccess)
    <Directory /var/www/monsite.fr/>
        # On autorise tous le monde a voir le site
        Order allow,deny
        allow from all
    </Directory>
    
    # Les logs (historiques des IPs et des fichiers envoyés)
    ErrorLog /var/log/apache2/monsite.fr-error_log      # Erreurs
    TransferLog /var/log/apache2/monsite.fr-access_log  # Acces
</VirtualHost>


I then configured my Windows host file, since am accessing the website from Windows instead on FireFox, and added the line:

192.xxx.x.xxx www.monsite.fr


Normally, then if I opened www.monsite.fr in my browser, it should point to the website, however, am getting an error: "500 Internal Server Error"

The server encountered an internal error or misconfiguration and was unable to complete your request.


However, if I use:

http://192.xxx.x.xxx/monsite.fr/install

whereby using this link I can access the installation files, it does work, but

http://www.monsite.fr/install

gives me the server error mentioned above

Anyone knows what may be causing this?

lordrt
Posting Whiz
383 posts since Jul 2010
Reputation Points: 30
Solved Threads: 33
 

I'm guessing you're using a PHP script. Try the following:

1. Rename .htaccess to ._htaccess and see if it works. If it doesn't, rename it back.

2. Apache might be having a problem serving PHP scripts. Create an info.php file in your root apache directory and type in

<?php phpinfo(); ?>


. browse to

http://localhost/info.php


and see if it loads up.

Apache is definitely configured right. The problem is with the script. Somehow, Apache is having a problem serving it.

Which script are you trying to install?

superhustler
Newbie Poster
3 posts since Aug 2011
Reputation Points: 10
Solved Threads: 1
 

It was indeed a prob with the apache config itself, a friend helped me out in the end with it

lordrt
Posting Whiz
383 posts since Jul 2010
Reputation Points: 30
Solved Threads: 33
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: