0 / 0 / 0
Регистрация: 10.05.2019
Сообщений: 53
|
|
1 | |
Установка Laravel Breeze25.05.2022, 10:03. Показов 1828. Ответов 28
Метки нет (Все метки)
Привет. У меня чистый Laravel 8.83.14
Хочу установить Laravel Breeze У меня вроде всё получилось, всё встало. (правда есть 6 предупреждений, я по честности не посмотрел логи). Просто всё встало и по идее должно работать, по ссылке /login, например, должна быть страничка с авторизацией на сайт, но вместо этого 404. Кто нибудь сможет помочь? Дело в роуте?
0
|
25.05.2022, 10:03 | |
Ответы с готовыми решениями:
28
Установка Laravel Установка Laravel в Linux Установка Laravel на сервере) Установка Laravel на OpenServer Установка laravel 5.4 без интернета |
0 / 0 / 0
Регистрация: 10.05.2019
Сообщений: 53
|
|
01.06.2022, 12:52 [ТС] | 21 |
Спасибо огромное за статью. У меня тогда такой вопрос. Исходя из статьи я понял, что мне не нужен .htaccess и я могу прописать директивы в apache2.conf. Так вот, могу поместить содержимое .htaccess в apache2.conf ? То бишь в apache2.conf
Код
# Sets the default security model of the Apache2 HTTPD server. It does # not allow access to the root filesystem outside of /usr/share and /var/www. # The former is used by web applications packaged in Debian, # the latter may be used for local directories served by the web server. If # your system is serving content from a sub-directory in /srv you must allow # access here, or in any related virtual host. <Directory /> Options FollowSymLinks AllowOverride None Require all denied </Directory> <Directory /usr/share> AllowOverride None Require all granted </Directory> <Directory /var/www/> Options -MultiViews -Indexes AllowOverride None Require all granted </Directory> #<Directory /srv/> # Options Indexes FollowSymLinks # AllowOverride None # Require all granted #</Directory> Код
# Sets the default security model of the Apache2 HTTPD server. It does # not allow access to the root filesystem outside of /usr/share and /var/www. # The former is used by web applications packaged in Debian, # the latter may be used for local directories served by the web server. If # your system is serving content from a sub-directory in /srv you must allow # access here, or in any related virtual host. <Directory /> Options FollowSymLinks AllowOverride None Require all denied </Directory> <Directory /usr/share> AllowOverride None Require all granted </Directory> <Directory /var/www/> Options -MultiViews -Indexes AllowOverride None Require all granted RewriteEngine On mod_rewrite On # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301] # Send Requests To Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] </Directory> #<Directory /srv/> # Options Indexes FollowSymLinks # AllowOverride None # Require all granted #</Directory> Это кажется не выход. Я запутался уже если честно =) Добавлено через 1 минуту Возможно дело в OS? Может Ubuntu полегче будет. Мне бы хотелось понять в чём проблема, и всё таки сделать на Дебиан.
0
|
5753 / 4133 / 1507
Регистрация: 06.01.2011
Сообщений: 11,276
|
|
01.06.2022, 19:45 | 22 |
Код
<Directory /var/www/> Код
<Directory /var/www/html/176.119.147.115/public>
0
|
0 / 0 / 0
Регистрация: 10.05.2019
Сообщений: 53
|
|
01.06.2022, 20:19 [ТС] | 23 |
в Debian - это ports.conf, а не httpd. Если что =)
Добавлено через 19 минут Проблема актуальна, если что (((
0
|
542 / 393 / 251
Регистрация: 31.05.2016
Сообщений: 1,058
|
|
02.06.2022, 01:57 | 24 |
mod_rewrite включен?
в debian включается так Код
a2enmod rewrite
0
|
0 / 0 / 0
Регистрация: 10.05.2019
Сообщений: 53
|
|
02.06.2022, 10:00 [ТС] | 25 |
Директивы перенёс. Mod_rewrite включил. Роутинг не работает всё равно.
0
|
542 / 393 / 251
Регистрация: 31.05.2016
Сообщений: 1,058
|
|
02.06.2022, 16:42 | 26 |
Покажите как выглядит файл 000-default.conf
Вы перезапускали apache после изменения файлов?
0
|
0 / 0 / 0
Регистрация: 10.05.2019
Сообщений: 53
|
|
02.06.2022, 17:36 [ТС] | 27 |
Apache перезапускал.
файл 000-default.conf Код
<VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName www.example.com ServerAdmin webmaster@localhost DocumentRoot /var/www/html/176.119.147.115/public # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf </VirtualHost> <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews -Indexes </IfModule> RewriteEngine On # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301] # Send Requests To Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] </IfModule> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet Только у меня тут: Код
DocumentRoot /var/www/html/176.119.147.115/public Добавлено через 3 минуты То бишь, название проекта не 176.119.147.115 =)
0
|
542 / 393 / 251
Регистрация: 31.05.2016
Сообщений: 1,058
|
|
02.06.2022, 17:48 | 28 |
Сообщение было отмечено ДваждыДва как решение
Решение
Директивы из htaccess должны быть в секции Directory
То есть: Код
<VirtualHost *:80> #ServerName www.example.com ServerAdmin webmaster@localhost DocumentRoot /var/www/html/176.119.147.115/public <Directory /var/www/html/176.119.147.115/public> #Options SymLinksIfOwnerMatch #AllowOverride All Require all granted RewriteEngine On # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301] # Send Requests To Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
1
|
0 / 0 / 0
Регистрация: 10.05.2019
Сообщений: 53
|
|
02.06.2022, 17:54 [ТС] | 29 |
Спасибо дружище! Всё работает!
0
|
02.06.2022, 17:54 | |
02.06.2022, 17:54 | |
Помогаю со студенческими работами здесь
29
Установка laravel (открытие по localhost/Name.loc) Laravel 5 установка в Windows 7 x86 OpenServer Установка Trongate Framework (альтернатива Laravel) Установка (Composer) predis под Laravel Установка Laravel 5 на IIS 7.5 Установка на хостинг Laravel Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |