装载:ubuntu下apache ssl 配制方法 - XiZi's Blog

装载:ubuntu下apache ssl 配制方法

Xizi posted @ 2009年4月28日 12:59 in Ubuntu , 2300 阅读

 

基于的Ubuntu版本Edgy,在Ubuntu下面安装配置Apache都比较简单。相应的配置文件位置如下:
默认站点在 /var/www/

配置文件在 /etc/apache2/

日志在 /var/log/apache/

启动脚本是 /usr/sin/apache2ctl 或者 /etc/init.d/apache2


1、安装Apache

$sudo apt-get install apache2


2、开启SSL模块

$sudo a2enmod ssl


3、创建证书

可以使用apache内置的工具创建默认的证书,通过-days指定有效期。

$sudo apache2-ssl-certificate


另外我们可以使用openssl来创建

$sudo openssl req -x509 -newkey rsa:1024 -keyout apache.pem -out apache.pem -nodes -days 999

注:在要求输入Common Name (eg, YOUR name) 时,输入你的主机名。


4、编辑SSL的配置

我们可以将当前的默认站点配置文件拷贝一份,然后进行修改

#vi /etc/apache2/sites-enabled/001-ssl

把端口改为443

加入SSL认证配置

其它的根据需要自己定制 与普通配置无异 

ameVirtualHost *:443
ServerSignature On
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem
ServerAdmin webmaster@localhost
#[......]
 
 

修改普通http方式的配置

#vi /etc/apache2/sites-enabled/000-default

把端口改为80 

ameVirtualHost *:80
ServerAdmin webmaster@localhost
#[......]

 

编辑Apache端口配置,加入443端口(SSL的)

>#vi /etc/apache2/ports.conf
Listen 80
Listen 443 

重新载入Apache的配置

$sudo /etc/init.d/apache2 force-reload

或者重新启动Apache2

$sudo /etc/init.d/apache2 restart

 

Avatar_small
Top SEO 说:
2022年2月22日 08:19

I recently came across your article and have been reading along. I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end. I would like to read newer posts and to share my thoughts with you. 04X5911

Avatar_small
Top SEO 说:
2022年2月22日 08:28

It's really nice and meanful. it's really cool blog. Linking is very useful thing.you have really helped lots of people who visit blog and provide them usefull information. pggame123

Avatar_small
Top SEO 说:
2022年2月22日 22:18

Really appreciate this wonderful post that you have provided for us.Great site and a great topic as well i really get amazed to read this. Its really good. home improvement

Avatar_small
Top SEO 说:
2022年2月23日 01:35

It was wondering if I could use this write-up on my other website, I will link it back to your website though.Great Thanks. Buy DMT powder

Avatar_small
Ali 说:
2022年2月26日 08:56 I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details. tiktok views free
Avatar_small
Top SEO 说:
2022年2月26日 21:48

Really appreciate this wonderful post that you have provided for us.Great site and a great topic as well i really get amazed to read this. Its really good. coconut lime reed diffuser

Avatar_small
Top SEO 说:
2022年2月26日 21:50

I finally found great post here.I will get back here. I just added your blog to my bookmark sites. thanks.Quality posts is the crucial to invite the visitors to visit the web page, that's what this web page is providing. Partnering Facilitator

Avatar_small
Top SEO 说:
2022年2月26日 21:51

I wanted to leave a little comment to support you and wish you a good continuation. Wishing you the best of luck for all your blogging efforts. Mississauga SEO

Avatar_small
Top SEO 说:
2022年2月27日 07:41

Thanks for the blog loaded with so many information. Stopping by your blog helped me to get what I was looking for. Propic DP Border Maker

Avatar_small
Top SEO 说:
2022年2月27日 07:50

Thank you for taking the time to publish this information very useful! Minecraft

Avatar_small
Top SEO 说:
2022年3月03日 02:55

Really appreciate this wonderful post that you have provided for us.Great site and a great topic as well i really get amazed to read this. Its really good. export instagram comments

Avatar_small
Top SEO 说:
2022年3月03日 07:29

Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work! tiktok calculator

Avatar_small
Top SEO 说:
2022年3月03日 07:38

I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post. tiktok downloader

Avatar_small
Ali 说:
2022年3月03日 23:13

This is my first time visit to your blog and I am very interested in the articles that you serve. Provide enough knowledge for me. Thank you for sharing useful and don't forget, keep sharing useful info: big rob children book online

Avatar_small
Top SEO 说:
2022年3月03日 23:46

You re in point of fact a just right webmaster. The website loading speed is amazing. It kind of feels that you're doing any distinctive trick. Moreover, The contents are masterpiece. you have done a fantastic activity on this subject! Marketing Agency

Avatar_small
newsuptimes 说:
2022年3月06日 00:10

You shared amazing article. From last year ago I was subscribe your website. Its amazing keep it up. Chekout my it will be beneficial for your website
<a href=”https://newsuptimes.com/picuki/”>picuki</a>

Avatar_small
newsuptimes 说:
2022年3月06日 00:11

You shared amazing article. From last year ago I was subscribe your website. Its amazing keep it up. Chekout my it will be beneficial for your website

Avatar_small
picus 说:
2022年3月23日 09:14

Hello, can you check this website lol? it is really good!! [url=https://minecraftwild.com]Minecraft Wild[/url]

Avatar_small
picus 说:
2022年3月23日 09:14

To je ale picus lol! <a href="https://minecraftwild.com">Minecraft Wild</a>
@Ali: ahoj

Avatar_small
picus 说:
2022年3月23日 09:16

<p>
Ok! thanks for reading lol. <a href="https://minecraftwild.com">Minecraft Wild</a></p>

Avatar_small
picus 说:
2022年3月23日 09:17

You re in point of fact a just right webmaster. The website loading speed is amazing. It kind of feels that you&#39;re doing any distinctive trick. Moreover, The contents are masterpiece. you have done a fantastic activity on this subject! <a href="https://minecraftwild.com">Minecraft Wild</a></p>

Avatar_small
picus 说:
2022年3月23日 09:17

You re in point of fact a just right webmaster. The website loading speed is amazing. It kind of feels that you&#39;re doing any distinctive trick. Moreover, The contents are masterpiece. you have done a fantastic activity on this subject! <a href="https://minecraftwild.com">Minecraft Wild</a>

Avatar_small
picus 说:
2022年3月23日 09:18

<p>You re in point of fact a just right webmaster. The website loading speed is amazing. It kind of feels that you&#39;re doing any distinctive trick. Moreover, The contents are masterpiece. you have done a fantastic activity on this subject! <a href="https://minecraftwild.com">Minecraft Wild</a></p>

Avatar_small
picus 说:
2022年3月23日 09:19

Check out this website <a href="https://minecraftwild.com">Minecraft Wild</a>

Avatar_small
picus 说:
2022年3月23日 09:20 <p>   You re in point of fact a just right webmaster. The website loading speed is amazing. It kind of feels that you&#39;re doing any distinctive trick. Moreover, The contents are masterpiece. you have done a fantastic activity on this subject! <a href="https://minecraftwild.com">Marketing Agency</a></p>

 

Avatar_small
picus 说:
2022年3月23日 09:21

<p> You re in point of fact a just right webmaster. The website loading speed is amazing. It kind of feels that you&#39;re doing any distinctive trick. Moreover, The contents are masterpiece. you have done a fantastic activity on this subject! <a href="https://www.minecraftwild.com/">Marketing Agency</a></p>

Avatar_small
picus 说:
2022年3月23日 09:21

Check out this" https://minecraftwild.com

Avatar_small
picus 说:
2022年3月23日 09:23

Thank you for reading this! <a href="Minecraft Wild">Marketing Agency</a>

Avatar_small
advs 说:
2022年3月31日 02:58

Really awesome article. It has been a pleasure reading it, i just want to tell you that I appreciate what you do. If you want to take a look on what I do and how my work looks then you can check out my website. It is mainly about the Tech Stuff and I would really appreciate it if you do. Here it is: <a href="https://techbloo.com">TechBloo</a>

Avatar_small
dark web/deep web/d 说:
2022年8月21日 00:59

Keep in mind that even though you may be looking for information on how to make money on the dark web, this isn't usually a legitimate place to start. It's usually a place to do illegal activities. dark web links

Avatar_small
dark web/deep web/d 说:
2022年8月21日 01:54

This isn't an overnight process, so be patient and keep track of your progress as you search for the perfect opportunity. deep web

Avatar_small
dark web/deep web/d 说:
2022年8月21日 02:19

Linking is just another way of saying that if you write or have some information on a particular website and if you have a link to that website, then you can help bring people to the website. dark web sites

Avatar_small
dark web/deep web/d 说:
2022年8月21日 02:38

They spent hours researching and writing articles and submitting them to directories so that they can get the maximum exposure and for people to use. dark web links

Avatar_small
dark web/deep web/d 说:
2022年8月21日 02:56

Once you have found the right people, you can start by creating some links for your own website. In this process, you will need to spend time looking for relevant links and then putting them on your website. dark web

Avatar_small
dark web/deep web/d 说:
2022年8月21日 03:15

First, visit the company's main website and look for their "Affiliate" link. On the "Affiliate" link there will be a button for joining the program. When you click this button, the program will begin to display products and services related to the product or service you selected. work from home jobs

Avatar_small
dark web/deep web/d 说:
2022年8月21日 03:35

Also, make sure that your site is easy to navigate and that it is visually appealing to the visitor. No one wants to visit your site and spend time trying to figure out how to use the link on your site! affiliate marketing success

Avatar_small
charlly 说:
2023年1月15日 18:25

There are a few things you need to do in order to get SSL set up on your Apache server under Ubuntu. Firstly, you need to install themod_ssl and openssl packages. Next, you need to generate a private key and a certificate signing request. Once you have done this, you can get best vegan cbd oil your certificate from a certificate authority. Finally, you need to activate SSL on your server and configure the virtual hosts.

Avatar_small
Recover Unsaved Word 说:
2023年2月02日 18:49

Whether your work was mistakenly deleted or lost due to a Microsoft Word crash, there are methods for retrieving it. It happens when the power goes out or your document closes unexpectedly, Recover Unsaved Word Document and the Word Document has some technical recommendations that can be used to restore these documents, as well as methods that part of their data does save in cache, which helps us to get them back.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter
Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee