ubuntu 14.04 및 서버 버전: Apache/2.4.16(Ubuntu)
리디렉션 규칙이 작동하지 않거나 뭔가 빠졌나요? 브라우저에 입력할 때 https:teampass.domain.org를 사용하고 싶지만 대신https://teampass.domain.org/teampass 유일한 유효한 URL입니다. 나에게 사명이 있나요? 어떻게 사용하나요?https://teampass.domain.org
더 많은 /etc/hosts
127.0.0.1 localhost
127.0.1.1 teampass
192.*.*.* teampass teampass.domain.org
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
더보기/etc/apache2/apache2.conf
ServerRoot "/etc/apache2"
Mutex file:${APACHE_LOCK_DIR} default
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
# Include list of ports to listen on
Include ports.conf
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride ALL
Require all granted
</Directory>
<Directory /srv/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
AccessFileName .htaccess
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>
# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf
# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
# phpMyAdmin Configuration
Include /etc/phpmyadmin/apache.conf
#load ssl module
#LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
더보기/etc/apache2/sites-enabled/default-ssl.conf
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName teampass.domain.org
Serveralias www.teampass.domain.org
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCACertificateFile /etc/apache2/ssl/DigiCertCA
SSLCertificateFile /etc/apache2/ssl/star_domain_org
SSLCertificateKeyfile /etc/apache2/ssl/teampass.key
</VirtualHost>
추가 정보 /etc/apache2/sites-enabled/teampass.conf
<VirtualHost *:80>
ServerName teampass
Redirect permanent / https://teampass.domain.org/
ServerAdmin webmaster@localhost
ServerAlias www.teampass.domain.org
DocumentRoot /var/www/html/teampass
<Directory /var/www/html>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<IfModule mod_rewrite.c>
# DO NOT REMOVE
RewriteOptions Inherit
</IfModule>
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName teampass.
#ServerAlias www.teampass.domain.org
DocumentRoot /var/www/html/teampass
SSLCertificateFile /etc/apache2/ssl/star_domain_org
SSLCertificateKeyfile /etc/apache2/ssl/teampass.key
SSLCACertificateFile /etc/apache2/ssl/DigiCertCA
SSLEngine on
ErrorLog ${APACHE_LOG_DIR}/teampass_error.log
CustomLog ${APACHE_LOG_DIR}/teampass_access.log combined
<IfModule mod_rewrite.c>
# DO NOT REMOVE
RewriteOptions Inherit
</IfModule>
</VirtualHost>
response.htaccess
opt는 이메일 teampass 패키지의 저장 위치입니다. /var/www/html에 링크가 있습니다
HTML로 된 팀 패스
root@teampass:~# find / -name .htaccess
/opt/TeamPass-2.1.23/includes/avatars/.htaccess
/opt/TeamPass-2.1.23/upload/.htaccess
추가 정보 /opt/TeamPass-2.1.23/includes/avatars/.htaccess
AddHandler cgi-script .php .php3 .php4 .phtml .pl .py .jsp .asp .htm .shtml
.sh .cgi
Options -ExecCGI
더보기/opt/TeamPass-2.1.23/upload/.htaccess
AddHandler cgi-script .php .php3 .php4 .phtml .pl .py .jsp .asp .htm .shtml
.sh .cgi
Options -ExecCGI
RewriteEngine On
답변1
teampass.conf
파일 에서 DocumentRoot
읽을 줄을 변경하십시오.
DocumentRoot /var/www/html/teampass/teampass
두 개의 가상 호스트의 경우