Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions docs/guides/cms/dokuwiki_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tags:
* Comfort with modifying configuration files from the command line with an editor (our examples here will use _vi_, but you can substitute your favorite editor)
* Some knowledge about web applications and setup.
* Our example will use the [Apache Sites Enabled](../web/apache-sites-enabled.md) for setup, so it is a good idea to review that routine if you plan on following along.
* We will be using "wiki-doc.yourdomain.com" as the domain name throughout this example.
* We will be using "example.com" as the domain name throughout this example.
* We will assume throughout this document that you are the root user or can get there with _sudo_.
* We are assuming a fresh install of the OS, however that is **NOT** a requirement.

Expand Down Expand Up @@ -58,16 +58,16 @@ And add this to the very bottom of the file:

Create the site configuration file in sites-available:

`vi /etc/httpd/sites-available/com.yourdomain.wiki-doc`
`vi /etc/httpd/sites-available/com.example`

That configuration file should look something like this:

```
<VirtualHost *>
ServerName wiki-doc.yourdomain.com
DocumentRoot /var/www/sub-domains/com.yourdomain.wiki-doc/html
ServerName example.com
DocumentRoot /var/www/sub-domains/com.example/html

<Directory ~ "/var/www/sub-domains/com.yourdomain.wiki-doc/html/(bin/|conf/|data/|inc/)">
<Directory ~ "/var/www/sub-domains/com.example/html/(bin/|conf/|data/|inc/)">
<IfModule mod_authz_core.c>
AllowOverride All
Require all denied
Expand All @@ -78,7 +78,7 @@ That configuration file should look something like this:
</IfModule>
</Directory>

ErrorLog /var/log/httpd/wiki-doc.yourdomain.com_error.log
ErrorLog /var/log/httpd/example.com_error.log
CustomLog /var/log/httpd/wiki-doc.yourdomain_access.log combined
</VirtualHost>
```
Expand All @@ -87,13 +87,13 @@ Note that the "AllowOverride All" above, allows the .htaccess (directory specifi

Go ahead and link the configuration file into sites-enabled, but don't start web services as yet:

`ln -s /etc/httpd/sites-available/com.yourdomain.wiki-doc /etc/httpd/sites-enabled/`
`ln -s /etc/httpd/sites-available/com.example /etc/httpd/sites-enabled/`

### Apache DocumentRoot

We also need to create our _DocumentRoot_. To do this:

`mkdir -p /var/www/sub-domains/com.yourdomain.wiki-doc/html`
`mkdir -p /var/www/sub-domains/com.example/html`

## Installing DokuWiki

Expand Down Expand Up @@ -124,19 +124,19 @@ We don't want that leading named directory when we decompress the archive, so we

The second option is the "-C" option, and that tells tar where we want the archive to be decompressed to. So decompress the archive with this command:

`tar xzf dokuwiki-stable.tgz --strip-components=1 -C /var/www/sub-domains/com.yourdomain.wiki-doc/html/`
`tar xzf dokuwiki-stable.tgz --strip-components=1 -C /var/www/sub-domains/com.example/html/`

Once we have executed this command, all of DokuWiki should be in our _DocumentRoot_.

We need to make a copy of the _.htaccess.dist_ file that came with DokuWiki and keep the old one there too, in case we need to revert to the original in the future.

In the process, we will be changing the name of this file to simply _.htaccess_ which is what _apache_ will be looking for. To do this:

`cp /var/www/sub-domains/com.yourdomain.wiki-doc/html/.htaccess{.dist,}`
`cp /var/www/sub-domains/com.example/html/.htaccess{.dist,}`

Now we need to change ownership of the new directory and its files to the _apache_ user and group:

`chown -Rf apache.apache /var/www/sub-domains/com.yourdomain.wiki-doc/html`
`chown -Rf apache.apache /var/www/sub-domains/com.example/html`

## Setting Up DNS Or /etc/hosts

Expand All @@ -151,7 +151,7 @@ And then modify your hosts file to look something like this (note the IP address
```
127.0.0.1 localhost
127.0.1.1 myworkstation-home
10.56.233.179 wiki-doc.yourdomain.com wiki-doc
10.56.233.179 example.com wiki-doc

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
Expand Down Expand Up @@ -189,7 +189,7 @@ Now that our host name is set for testing and the web service has been started,

OR

`http://wiki-doc.yourdomain.com/install.php`
`http://example.com/install.php`

Either should work if you set your hosts file as above. This will bring you to the setup screen so that you can finish the setup:

Expand Down
6 changes: 3 additions & 3 deletions docs/guides/communications/asterisk_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ sudo dnf -y install git wget
Before you download this script, make sure you have the latest version. To do so, navigate to [the Asterisk download link here](http://downloads.asterisk.org/pub/telephony/asterisk/) and look for the latest build of Asterisk. Then copy the link location. As of the writing of this document, the following was the latest build:

```
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-18.6.0.tar.gz
tar xvfz asterisk-18-current.tar.gz
cd asterisk-18.6.0/
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20-current.tar.gz
tar xvfz asterisk-20-current.tar.gz
cd asterisk-20.0.0/
```

Before running the `install_prereq` below (and the remaining commands), you are going to need to be the superuser or root. It's much easier at this point to get into _sudo_ permanently for a while. We will exit back out of _sudo_ later in the process:
Expand Down
46 changes: 23 additions & 23 deletions docs/guides/file_sharing/sftp.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ Everything is made up here. Any resemblance to persons or sites that are real, i

**Sites:**

* mybrokenaxel.com
* mybrokenaxel = (site1.com)
user = mybroken
* myfixedaxel.com
* myfixedaxel = (site2.com)
user = myfixed

**Administrators**
Expand Down Expand Up @@ -96,8 +96,8 @@ mkdir -p /etc/httpd/sites-enabled
Creating the web directories:

```
mkdir -p /var/www/sub-domains/com.mybrokenaxel/html
mkdir -p /var/www/sub-domains/com.myfixedaxel/html
mkdir -p /var/www/sub-domains/com.site1/html
mkdir -p /var/www/sub-domains/com.site2/html
```
We will deal with the ownership of these directories in the script application found below.

Expand All @@ -122,7 +122,7 @@ Then save the file and exit.
We need two sites created. We will create the configurations in `/etc/httpd/sites-available` and then link them to `../sites-enabled`:

```
vi /etc/httpd/sites-available/com.mybrokenaxel
vi /etc/httpd/sites-available/com.site1
```

!!! note
Expand All @@ -131,17 +131,17 @@ vi /etc/httpd/sites-available/com.mybrokenaxel

```
<VirtualHost *:80>
ServerName www.mybrokenaxel.com
ServerName www.site1.com
ServerAdmin username@rockylinux.org
DocumentRoot /var/www/sub-domains/com.mybrokenaxel/html
DocumentRoot /var/www/sub-domains/com.site1/html
DirectoryIndex index.php index.htm index.html
Alias /icons/ /var/www/icons/


CustomLog "/var/log/httpd/com.mybrokenaxel.www-access_log" combined
ErrorLog "/var/log/httpd/com.mybrokenaxel.www-error_log"
CustomLog "/var/log/httpd/com.site1.www-access_log" combined
ErrorLog "/var/log/httpd/com.site1.www-error_log"

<Directory /var/www/sub-domains/com.mybrokenaxel/html>
<Directory /var/www/sub-domains/com.site1/html>
Options -ExecCGI -Indexes
AllowOverride None

Expand All @@ -156,22 +156,22 @@ vi /etc/httpd/sites-available/com.mybrokenaxel
Save this file and exit.

```
vi /etc/httpd/sites-available/com.myfixedaxel
vi /etc/httpd/sites-available/com.site2
```

```
<VirtualHost *:80>
ServerName www.myfixedaxel.com
ServerName www.site2.com
ServerAdmin username@rockylinux.org
DocumentRoot /var/www/sub-domains/com.myfixedaxel/html
DocumentRoot /var/www/sub-domains/com.site2/html
DirectoryIndex index.php index.htm index.html
Alias /icons/ /var/www/icons/


CustomLog "/var/log/httpd/com.myfixedaxel.www-access_log" combined
ErrorLog "/var/log/httpd/com.myfixedaxel.www-error_log"
CustomLog "/var/log/httpd/com.site2.www-access_log" combined
ErrorLog "/var/log/httpd/com.site2.www-error_log"

<Directory /var/www/sub-domains/com.myfixedaxel/html>
<Directory /var/www/sub-domains/com.site2/html>
Options -ExecCGI -Indexes
AllowOverride None

Expand All @@ -188,8 +188,8 @@ Save this file and exit.
Once the two configuration files are created, go ahead and link them from within `/etc/httpd/sites-enabled`:

```
ln -s ../sites-available/com.mybrokenaxel
ln -s ../sites-available/com.myfixedaxel
ln -s ../sites-available/com.site1
ln -s ../sites-available/com.site2
```
Now enable and start the `httpd` process:

Expand Down Expand Up @@ -237,8 +237,8 @@ If this works for both administrative users, you should be ready to go to the ne
We need to add our web users. That `../html` directory structure already exists, so we don't want to create it when we add the user, but we *do* want to specify it. We also do not want any login other than via SFTP so we need to use a shell that denies logins.

```
useradd -M -d /var/www/sub-domains/com.mybrokenaxel/html -g apache -s /usr/sbin/nologin mybroken
useradd -M -d /var/www/sub-domains/com.myfixedaxel/html -g apache -s /usr/sbin/nologin myfixed
useradd -M -d /var/www/sub-domains/com.site1/html -g apache -s /usr/sbin/nologin mybroken
useradd -M -d /var/www/sub-domains/com.site2/html -g apache -s /usr/sbin/nologin myfixed
```

Let's break down those commands a bit:
Expand Down Expand Up @@ -555,8 +555,8 @@ To test that these files show up and load as expected, you simply need to modify

```
127.0.0.1 localhost
192.168.1.116 www.mybrokenaxel.com mybrokenaxel.com
192.168.1.116 www.myfixedaxel.com myfixedaxel.com
192.168.1.116 www.site1.com site1.com
192.168.1.116 www.site2.com site2.com
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
Expand All @@ -569,7 +569,7 @@ ff02::2 ip6-allrouters

For real domains, you would want to populate your DNS servers with the hosts above. You can, though, use this *Poor Man's DNS* for testing any domain, even one that hasn't been taken live on real DNS servers.

Now, open your web browser and check to make sure that your `index.html` file for each domain displays by entering the URL in your browser's address bar. (Example: "http://mybrokenaxel.com") If your test index files load, everything is working correctly.
Now, open your web browser and check to make sure that your `index.html` file for each domain displays by entering the URL in your browser's address bar. (Example: "http://site1.com") If your test index files load, everything is working correctly.

## Part 3: Administrative Access with SSH key pairs

Expand Down
22 changes: 11 additions & 11 deletions docs/guides/security/ssl_keys_https.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,42 +37,42 @@ To start with, let's make sure that OpenSSL is installed on both your workstatio

If it is not installed, your system will install it and any needed dependencies.

Our example domain is ourownwiki.com. Keep in mind that you would need to purchase and register your domain ahead of time. You can purchase domains through a number of "Registrars".
Our example domain is example.com. Keep in mind that you would need to purchase and register your domain ahead of time. You can purchase domains through a number of "Registrars".

If you are not running your own DNS (Domain Name System), you can often use the same providers for DNS hosting. DNS translates your named domain, to numbers (IP addresses, either IPv4 or IPv6) that the Internet can understand. These IP addresses will be where the web site is actually hosted.

Let's generate the key using openssl:

`openssl genrsa -des3 -out ourownwiki.com.key.pass 2048`
`openssl genrsa -des3 -out example.com.key.pass 2048`

Note that we named the key, with a .pass extension. That's because as soon as we execute this command, it requests that you enter a passphrase. Enter a simple passphrase that you can remember as we are going to be removing this shortly:

```
Enter pass phrase for ourownwiki.com.key.pass:
Verifying - Enter pass phrase for ourownwiki.com.key.pass:
Enter pass phrase for example.com.key.pass:
Verifying - Enter pass phrase for example.com.key.pass:
```

Next, let's remove that passphrase. The reason for this is that if you don't remove it, each time your web server restarts and loads up your key, you will need to enter that passphrase.

You might not even be around to enter it, or worse, might not have a console at the ready to enter it. Remove it now to avoid all of that:

`openssl rsa -in ourownwiki.com.key.pass -out ourownwiki.com.key`
`openssl rsa -in example.com.key.pass -out example.com.key`

This will request that passphrase once again to remove the passphrase from the key:

`Enter pass phrase for ourownwiki.com.key.pass:`
`Enter pass phrase for example.com.key.pass:`

Now that you have entered the passphrase a third time, it has been removed from the key file and saved as ourownwiki.com.key
Now that you have entered the passphrase a third time, it has been removed from the key file and saved as example.com.key

## Generate the CSR

Next, we need to generate the CSR (certificate signing request) that we will use to purchase our certificate.

During the generation of the CSR, you will be prompted for several pieces of information. These are the X.509 attributes of the certificate.

One of the prompts will be for "Common Name (e.g., YOUR name)". It is important that this field be filled in with the fully qualified domain name of the server to be protected by SSL. If the website to be protected will be https://www.ourownwiki.com, then enter www.ourownwiki.com at this prompt:
One of the prompts will be for "Common Name (e.g., YOUR name)". It is important that this field be filled in with the fully qualified domain name of the server to be protected by SSL. If the website to be protected will be https://www.example.com, then enter www.example.com at this prompt:

`openssl req -new -key ourownwiki.com.key -out ourownwiki.com.csr`
`openssl req -new -key example.com.key -out example.com.csr`

This opens up a dialog:

Expand All @@ -86,7 +86,7 @@ This opens up a dialog:

`Organizational Unit Name (eg, section) []:` This would describe the division of the organization that your domain falls under. Again, you can just hit 'Enter' to skip.

`Common Name (eg, your name or your server's hostname) []:` Here, we have to enter our site hostname, example "www.ourownwiki.com"
`Common Name (eg, your name or your server's hostname) []:` Here, we have to enter our site hostname, example "www.example.com"

`Email Address []:` This field is optional, you can decide to fill it out or just hit 'Enter' to skip.

Expand All @@ -105,7 +105,7 @@ Now you should have generated your CSR.

Each certificate vendor will have basically the same procedure. You purchase the SSL and term (1 or 2 years, etc.) and then you submit your CSR. To do this, you will need to use the `more` command, and then copy the contents of your CSR file.

`more ourownwiki.com.csr`
`more example.com.csr`

Which will show you something like this:

Expand Down
Loading