T
T
TERRAN472016-07-17 08:46:34
CentOS
TERRAN47, 2016-07-17 08:46:34

After transferring to a vds server with CentOS, does not see public laravel5?

Good day, help guys, I transferred the project to a server, I can’t set it up there correctly,
in Apache I created a config, I registered the path to the project folder, and at the root I created .htaccess with
RewriteEngine On
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(. *)$ public/$1 [L]
gives:
forbidden
I tried to write the path to public in Apache
, the project opened, but clicking on the links gives:
Not Found
The requested URL /login was not found on this server.
PS--->this option will not work.
I just create an index.php file in the root of the project and write
PHP
<?php
include "/public/index.php";
-----------------------------------------

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2016-07-17
@alexey-m-ukolov

RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
If VirtualHost is correctly configured, this redirection is not correct.
Correct VirtualHost:
<VirtualHost *:80>
    ServerName localhost

    ServerAdmin [email protected]
    DocumentRoot /var/www/html/project/public

    <Directory /var/www/html/project/public>
        AllowOverride All
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

.htaccess:
Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question