laravel the requested url was not found on this server

前端 未结 9 862
不思量自难忘°
不思量自难忘° 2020-12-12 12:54

I\'ve an Ubuntu 14.04 kernel. I was installing my Laravel application in this server. After installing, I tried to set the root directory to public.

sudo n         


        
相关标签:
9条回答
  • 2020-12-12 13:19

    For Ubunutu 18.04 inside a vagrant box ... This is what helped me

    1. Ensure www-data has permissions to the .htaccess file

        
          sudo chown www-data.www-data .htaccess
        
      
    2. edit the apache2 conf to allow for symlinks etc

        
          sudo nano /etc/apache2/apache2.conf
        
      

      Add this to the file

    <Directory /var/www/html/>
      Options Indexes FollowSymLinks
      AllowOverride all
      Require all granted
    </Directory>

    1. Restart your apache2 server

      sudo service apache2 restart

    I hope this helps someone.

    0 讨论(0)
  • 2020-12-12 13:20

    In addition to all the answers if you still encounter some variation of the problem, edit the .env file and set APP_URL to your domain name as in:

     APP_URL=similar_to_my_avatar_link 
    
    0 讨论(0)
  • 2020-12-12 13:29

    In httpd.conf file you need to remove #

    #LoadModule rewrite_module modules/mod_rewrite.so
    

    after removing # line will look like this:

    LoadModule rewrite_module modules/mod_rewrite.so
    

    And Apache restart

    0 讨论(0)
提交回复
热议问题