Question

I installed a laravel project to /home/user/development. The project is called rpm (/home/user/development/rpm). I also have another project that I have been using at /home/public_html. It's called mgmt (/home/user/public_html/mgmt). I can navigate just fine to mgmt via localhost/mgmt. It's conf file in sites-available is

 <VirtualHost *:80>

ServerAdmin webmaster@localhost
DocumentRoot /home/user/public_html/

<Directory /home/user/public_html/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/rpm-error.log
CustomLog ${APACHE_LOG_DIR}/rpm-access.log combined

 </VirtualHost>

Now my laravel project (rpm) does not work. Navigating to localhost/rpm gives a 404. It's conf file looks like this

 <VirtualHost *:80>

ServerAdmin webmaster@localhost
DocumentRoot /home/user/development/rpm/public/
Alias /rpm /home/user/development/rpm/public

<Directory /home/user/development/rpm/public/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/rpm-error.log
CustomLog ${APACHE_LOG_DIR}/rpm-access.log combined

</VirtualHost>

What could be the problem here? Both of those config files have symlinks in the sites-enabled folder.

No correct solution

OTHER TIPS

Modify the first conf to this. Discard the second conf.

<VirtualHost *:80>

ServerAdmin webmaster@localhost
DocumentRoot /home/user/public_html/

Alias /rpm /home/user/development/rpm/public

<Directory /home/user/public_html/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
</Directory>

<Directory /home/user/development/rpm/public/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/rpm-error.log
CustomLog ${APACHE_LOG_DIR}/rpm-access.log combined

 </VirtualHost>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top