Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 539 Vote(s) - 3.59 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"The requested URL was not found on this server" error in laravel php project

#1
I started to develop a project with laravel. I installed it using this link [how-to-install-laravel-on-ubuntu-lamp][1].

I installed `composer` successfully, and using this command : `sudo composer create-project laravel/laravel /home/egz-pc/laravel-project` I created new project named `laravel-project` then a changed permissions using chmod 777 command.I restart apache and execute my project.

My problem is that when I type in browser:

[To see links please register here]

I'm getting an error: `The requested URL /laravel-project was not found on this server.` If I create a project in /var/www/html on my local host I have no problems, and that error does not appear. What can I do?


[1]:

[To see links please register here]

Reply

#2
The Apache server is installed on var/www/html.This is the default root directory of apache.

Either change the root directory of Apache or move the project to var/www/html.

To change Apache's root directory,

Run


cd /etc/apache2/sites-available

Then open the 000-default.conf file using the command

nano 000-default.conf


Edit the DocumentRoot

[![enter image description here][1]][1]

Then restart the apache server

sudo service apache2 restart


----------
If you get "Forbidden You don't have permission to access / on this server" after changing the root of apache then do follow these steps

1.Find the apache2.conf located in etc/apache2 and open it using

nano apache2.conf
2.Use ctrl+w and search for Directory (It should be in line 153)

3.It should look like this

<Directory />
Options Indexes FollowSymLinks
AllowOverride All
Require all denied
</Directory>

4.Change it to

<Directory />
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
[![enter image description here][2]][2]
5.Restart apache2 and it should work.


EDIT:

I have made a script that lets you change Apache root directory in 1 command.

Link: [Script for Apache][3]


[1]:

[2]:

[3]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through