Apache/README.md

25 lines
603 B
Markdown

# Apache
Heyo is a Hello World for Apache
## on Ubuntu 18.04
Basic Install
```
sudo apt-get install apache2 -y
echo "ServerName localhost" >> /etc/apache2/apache2.conf
```
Enable a websites.conf file by
```
a2ensite 000-default.conf
```
Disable a websites.conf file by
```
a2dissite 000-default.conf
```
Create a `pem` to use https/ssl on your website with apache. Make sure to run `sudo a2enmod ssl` to enable ssl for apache, next `cd /some/dir` you want your cert and key pem files created, then run:
```
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
```