Apache2 Excercise

1.
Installed Apache2 HTTP Server on my Ubuntu server. Command was: sudo apt-get install apache2.

If I wanted to reinstall apache2 i would type in: sudo apt purge apache2 .

Useful commands for using apache2:
apache2ctl start
apache2ctl restart
apache2ctl stop
apache2ctl fullstatus or
systemctl start apache2
systemctl restart apache2
systemctl stop apache2
systemctl status apache2

a2enmod



2.
/etc/apache2/apache2.conf is the main configuration file. mods-available contains all modules and mods-enabled contains modules which are currently in use. Modules can be enabled with a2enmod command. file “envvars” is default environment variables for apache2ctl.

3.
I created a www-page named “testing.html” in /var/www/html.
I can reach the site by typing my apache servers ip address to browsers search bar and /testing.html after the ip.

4.
Userdir module allows user-specific directories to be accessed using the http://example.com/~user/ syntax.

To enable it: a2enmod userdir
To disable it: a2dismod userdir



5.
Restarting the apache2 is done by typing in: systemctl restart apache2

6.
Public_html directory is for normal users to create their own web page.

10.
Copy file: default-ssl.conf > /sites-enabled/
Generating RSA key: openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key

Warning message from browser.

12.
I could get a free SSL certificate from Let’s Encrypt project, but first I would have to register a domain name, because Let’s Encrypt certificate authority will not issue certificates for a bare IP address.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s