Thursday, February 22, 2024
 Popular · Latest · Hot · Upcoming
rated 0 times [  1] [ 0]  / answers: 1 / hits: 4932  / 3 Years ago, sun, may 23, 2021, 2:51:11

I am running Ubuntu Gnome 14.04, I apt-get installed apache2, php and mysql. From there, localhost was working fine, running from the /var/www/html/ directory.

I created a new file, /etc/apache2/sites-available/laravel.example.conf, and mimicked the 000-default.conf file that already existed in that folder:

<VirtualHost *:80>
ServerName laravel.example
ServerAlias www.laravel.example
ServerAdmin [email protected]
DocumentRoot /var/www/sites/laravel.example
ErrorLog ${APACHE_LOG_DIR}/laravel.example_error.log
CustomLog ${APACHE_LOG_DIR}/laravel.example_access.log combined

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

I created the folder at /var/www/sites/laravel.example, added in laravel.example to /etc/hosts, ran a2ensite laravel.example.conf, restarted apache, but still just get Web page not available when I try load it. Any ideas?

More From » apache2


You need to set ownership / permissions of the directories and files to e readable by www-data

Personally I use:

sudo chown -R root:www-data /var/www
chmod 750 /var/www/sites
chmod 750 /var/www/sites/sites/laravel.example
chmod 640 /var/www/sites/sites/laravel.example/*

[#23417] Monday, May 24, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 276
Total Questions: 104
Total Answers: 108

Location: Montenegro
Member since Thu, Jun 16, 2022
2 Years ago