Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

采用Apache web服务访问admin后台404 #2086

Open
exqmjmz opened this issue Nov 4, 2023 · 2 comments
Open

采用Apache web服务访问admin后台404 #2086

exqmjmz opened this issue Nov 4, 2023 · 2 comments

Comments

@exqmjmz
Copy link

exqmjmz commented Nov 4, 2023

  • Laravel Version: 10.10
  • PHP Version: 8.1
  • Dcat Admin Version: 2.2.3

Description:

web服务采用的是apache,已开启伪静态模块,.htaccess 用的是默认的

`


Options -MultiViews -Indexes

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]
`

参照操作手册已经完成
php artisan admin:publish

php artisan admin:install

image

执行完composer require dcat/laravel-admin:"2.*" -vvv

image

执行完php artisan admin:publish
image

执行完php artisan admin:install

image

数据库也自动建有数据
image
image

直接访问首页显示的是Laravel默认页面

image

但是访问/admin显示404错误,没有更改过路由

@andyzu
Copy link

andyzu commented Feb 15, 2024

我记得在 apache 里面,需要加上 public 访问,如:http://你的域名/public/admin 来访问

@matoujin
Copy link

我猜apache配置文件的rewrite模块没取消注释

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants