난 stackoverflow 웹 사이트를 통해 찾고 있었고 내 질문에 대한 답변을 찾을 수 없습니다.우분투 htaccess 문제
apache2를 설치하면 기본적으로 웹 루트가/var/www /입니다./var/www/test /라는 새로운 webspace를 만들면 .htaccess 파일이 입력되지 않으면 작동하지 않습니다. . 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 [email protected]
DocumentRoot /var/www
# 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>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
사람이 어떤 조언을 제공 할 수 있습니다?
위의 파일이 내 htaccess 파일 전체에 해당하지 않는 이유는 AllowOverride와 관련이 없습니다. 없음 또는 개별 웹 공간 –
위의 내용과 같이 '.htaccess' 파일이 보이지 않아야합니다. 여러분이 게시 한 것은 아파치 서버 설정 파일과 유사합니다.이 파일은'/ etc/apache2/sites-enabled'에 있으며'/ etc/apache2/sites-available'에 링크되어 특정 웹 사이트를 가능하게합니다. 그러나'.htaccess' 파일은 웹 사이트의 * 개별 폴더 *에 존재하며 그 폴더와 관련된 옵션을 지정합니다. * VirtualHost 또는 로깅 지시문이 아닙니다. – jnylen
네, 죄송합니다. 내가 아파치 conf 파일 (위 게시) 어떤 AllowOverride 없음 또는 모든 조언을 갖고 있지 않는 것 같아서 말하는 것을 사과? –