Apache setup

Category: /knowledge /linux
Tags: linux apache

Install

sudo aptitude install apache2-mpm-prefork apache2-utils \
    libapache2-mod-wsgi libapache2-svn 
a2enmod ssl alias  proxy  proxy_http mime 

create a self-signed certificate

openssl genrsa -aes256 -out server.key 4096
# provide a phrase here for now, we will remove it later.
openssl req -new -key server.key -out server.csr 
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt 
openssl rsa -in server.key -out server.key.insecure
mv server.key server.key.secure
mv server.key.insecure server.key 

sudo mkdir /etc/apache2/ssl
sudo mv server.crt server.key /etc/apache2/ssl

讨论

提示

  • 如果看不到讨论部分, 请暂时关掉adblock in Firefox/Chrome
  • 本网站使用Javascript实现评论功能, 此处外链对提高您的网站PR没有帮助. (潜台词: 请不要灌水, 谢谢)