你好,游客 登录 注册 搜索
背景:
阅读新闻

Ubuntu Feisty中安装Apache SSL命令支持(编译apache2)

[日期:2007-04-24] 来源:Linux公社  作者:Linux [字体:大 中 小]

创建并启用ssl站点:

sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
sudo gedit /etc/apache2/sites-available/ssl
修改其内容,设定对应端口,启用ssl,指定站点证书文件位置等,修改后类似如下:

NameVirtualHost *:443
<virtualhost *:443>
        ServerAdmin webmaster@localhost
 
        SSLEngine On
        SSLCertificateFile /etc/apache2/ssl/apache.pem
 
        DocumentRoot /var/www/
        <directory />
                Options FollowSymLinks
                AllowOverride None
        </directory>
 
        <directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
                # This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                # Commented out for Ubuntu
                #RedirectMatch ^/$ /apache2-default/
        </directory>
 
        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </directory>
 
        ErrorLog /var/log/apache2/error.log
 
        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn
 
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On
 
    Alias /doc/ "/usr/share/doc/"
    <directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </directory>
 
</virtualhost>

linux
【内容导航】
第1页:Ubuntu Feisty中安装Apache SSL命令支持(编译apache2) 第2页:Ubuntu Feisty中安装Apache SSL命令支持(编译apache2)
第3页:Ubuntu Feisty中安装Apache SSL命令支持(编译apache2)
相关资讯       Ubuntu Feisty  Apache SSL 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款