duanchouyi6730 2014-05-16 00:40
浏览 140

无法使用Apache通过localhost导航到laravel项目

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.

  • 写回答

1条回答 默认 最新

  • dsf8897 2014-05-16 02:03
    关注

    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>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题