MPM设置 https://bbs.csdn.net/topics/390479795/
vim /opt/lampp/etc/extra/httpd-ssl.conf
vim /opt/lampp/etc/extra/httpd-vhosts.conf
vim /opt/lampp/etc/httpd.conf
<VirtualHost *:80>
ServerAdmin webmaster@vhost.example.com
DocumentRoot "/home/vhost.example.com"
ServerName vhost01
ServerAlias vhost.example.com
ErrorLog /opt/lampp/logs/vhost.example.com-error.log
CustomLog /opt/lampp/logs/vhost.example.com-access.log common
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxRequestWorkers 250
MaxConnectionsPerChild 0
AssignUserId www-data www-data
</IfModule>
</VirtualHost>
<VirtualHost *:443>
DocumentRoot "/home/vhost.example.com"
ServerName vhost.example.com
ServerAlias *.vhost.example.com
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile "/opt/lampp/etc/ssl.crt/server.crt"
SSLCertificateKeyFile "/opt/lampp/etc/ssl.key/server.key"
<FilesMatch "/.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
BrowserMatch ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
CustomLog "/var/logs/www-ssl_request_log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x /"%r/" %b"
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxRequestWorkers 250
MaxConnectionsPerChild 0
AssignUserId www-data www-data
</IfModule>
</VirtualHost>
=============================
<Directory "/home/www.abc.com.cn/admin">
AuthType Basic
AuthName "sagitar Web admin"
AuthUserFile "/opt/lampp/etc/htpasswd"
Satisfy All
require user abcuser
</Directory>
制作用户密码文件
htpasswd -b d:/users/user.passwd user3 123456
制作访问验证文件 .htaccess
authtype basic
authname "www.home.net"
authuserfile d:/users/users.passwd
require user user1
转载于:https://www.cnblogs.com/yisuo/p/8810741.html