PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, March 15, 2022

[FIXED] Apache 500 Internal Server Error on my virtual host

 March 15, 2022     apache, lamp, ubuntu, vhosts, virtualhost     No comments   

Issue

I have my web app projects located in a folder in /media/disk1/Projects. I want to serve them using an Apache virtualhost at http://lab/.

This is how I set up my virtual host:

1. Copied /etc/apache2/sites-available/default to /etc/apache2/sites-available/lab

2. Edited /etc/apache2/sites-available/lab to the following:

<VirtualHost *:80>
ServerAdmin tim@localhost
ServerName lab

DocumentRoot /media/disk1/Projects
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
# <Directory /var/www/>
<Directory /media/disk1/Projects>
    Require all granted
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>

3. Added 127.0.0.1 lab to my /etc/hosts:

127.0.0.1   localhost
127.0.0.1   lab

4. Accessed http://lab only to get 500 Internal Server Error

All the subfolder permissions are set to drwxrwxrwx But my http://lab/phpmyadmin works.

Help me resolve. Thanks.


Solution

Error solved by checking this forum; http://boinc.berkeley.edu/dev/forum_thread.php?id=8603 On my /var/log/apache2/error.log the last error was:

[Wed Oct 09 09:10:04 2013] [crit] [client 127.0.0.1] configuration error:  couldn't perform authentication. AuthType not set!: /

So I followed someone elses solution and commented the line

# Require all granted

just under on my /etc/apache2/sites-available/lab and TADA! I was able to list my Projects directory in my browser.



Answered By - Tim Truston
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing