0

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?

Edited by Ritesh_4: n/a

2
Contributors
2
Replies
22
Views
6 Years
Discussion Span
Last Post by Ritesh_4
0

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?

0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.