apache2 虚拟机多用户多站点设置 mpm-itk

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值