0
내 사이트 중 하나에 대해 http 인증을 설정했습니다. 웹 응용 프로그램은 코드 점화 장치와 사용자 지정 URI 라우팅을 사용하여 작성됩니다. 사이트의 .conf 파일을 변경 한 후 홈페이지 이외의 페이지에 액세스하려고하면 404 Not Found
오류가 발생합니다. 예를 들어, HTTP 인증하기 전에 일 /about
에 이동하지 메시지와 함께 404를 제공합니다http 인증이 작동하지 않는 이유는 무엇입니까?
The requested URL /about was not found on this server.
Apache/2.4.7 (Ubuntu) Server at example.com Port 80
가 왜 '/'디렉토리로 요청을 아파치 보내는? 사이트 사용에서 (약간의 보안을 위해 적응)에의 .conf 파일은 다음과 같다 : 디렉토리 정의 < 디렉토리/홈/사용자/CodeIgniter의 >에서
<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 example.com
DirectoryIndex index.php
ServerAdmin [email protected]
DocumentRoot /home/user/codeigniter
# 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 /home/user/logs/codeigniter/error.log
CustomLog /home/user/logs/codeigniter/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
<Directory /home/user/codeigniter/>
# Options Indexes FollowSymLinks Includes ExecCGI
# AllowOverride All
# Require all granted
AuthType Basic
AuthName "Beta Site"
# (Following line optional)
AuthBasicProvider file
AuthUserFile /var/www/passwd/passwords
Require user user
</Directory>
아, 고마워, 어리석은 실수. – Wold