You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Testing a new NvChad interface by editing this file (rocky-linux#1888)
* add fenced code block tags where necessary
* remove hard tabs in parts of the Apache configuration
* remove errant spaces and line feeds
* add correct emphasis characters
Copy file name to clipboardExpand all lines: docs/guides/web/apache-sites-enabled.md
+22-23Lines changed: 22 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,23 +31,24 @@ Historical fact: This server setup appears to have started with Debian-based sys
31
31
For those looking for a similar setup for Nginx, [examine this guide](nginx-multisite.md).
32
32
33
33
## Install Apache
34
+
34
35
You will likely need other packages for your website, such as PHP, database, or other packages. Installing PHP along with `http` will get you the most recent version from the Rocky Linux repositories.
35
36
36
37
Just remember that you may need modules, such as `php-bcmath` or `php-mysqlind`. Your web application specifications will dictate what you need. You can install these when needed. For now, you will install `http` and PHP, as those are almost a forgone conclusion:
37
38
38
39
From the command-line run:
39
40
40
-
```
41
+
```bash
41
42
dnf install httpd php
42
43
```
43
44
44
45
## Add extra directories
45
46
46
47
This method uses a couple of additional directories, which do not currently exist on the system. You need to add two directories in */etc/httpd/* called "sites-available" and "sites-enabled."
@@ -124,21 +125,21 @@ When created, you need to write (save) it with ++shift+:+wq++.
124
125
125
126
In the example, loading the wiki site happens from the "html" subdirectory of _your-server-hostname_, which means that the path you created in _/var/www_ (above) will need some additional directories to satisfy this:
This will create the entire path with a single command. Next you want to install your files to this directory that will actually run the website. This might be something you made yourself, or an installable web application (in this case a wiki) that you downloaded.
## <aname="https"></a>Configuration `https` using an SSL/TLS certificate
140
141
141
-
As stated earlier, every web server created these days _should_ be running with SSL/TLS (the secure socket layer).
142
+
As stated earlier, every web server created these days *should* be running with SSL/TLS (the secure socket layer).
142
143
143
144
This process starts by generating a private key and CSR (certificate signing request) and submitting the CSR to the certificate authority to buy the SSL/TLS certificate. The process of generating these keys is somewhat extensive.
144
145
@@ -148,15 +149,15 @@ You can also use this alternate process, using an [SSL certificate from Let's En
148
149
149
150
### Placement of the SSL/TLS keys and certificates
150
151
151
-
Since you have your keys and certificate files, you need to place them logically in your file system on the web server. As you have seen with the example configuration file, you are placing your web files in _/var/www/sub-domains/your-server-hostname/html_.
152
+
Since you have your keys and certificate files, you need to place them logically in your file system on the web server. As you have seen with the example configuration file, you are placing your web files in `/var/www/sub-domains/your-server-hostname/html`.
152
153
153
-
You want to place your certificate and key files with the domain, but outside of the document root, which in this case is the _html_ folder.
154
+
You want to place your certificate and key files with the domain, but outside of the document root, which in this case is the *html* folder.
154
155
155
156
You never want to risk exposing your certificates and keys to the web. That would be bad!
156
157
157
158
Instead, you will create a directory structure for our SSL/TLS files, outside the document root:
@@ -166,9 +167,9 @@ If you are new to the "tree" syntax for making directories, what the above says
166
167
167
168
Just a note ahead of time: Storing the certificate signing request (CSR) file in the tree is not necessary, but it simplifies some things. If you ever need to re-issue the certificate from a different provider, having a stored copy of the CSR is a good idea. The question becomes where can you store it so that you will remember, and storing it within the tree of your website is logical.
168
169
169
-
Assuming that you have named your key, csr, and crt (certificate) files with the name of your site, and that you have them stored in _/root_, you will copy them up to their locations:
170
+
Assuming that you have named your key, csr, and crt (certificate) files with the name of your site, and that you have them stored in*/root*, you will copy them up to their locations:
@@ -254,11 +254,10 @@ Remember that our *httpd.conf* file is including */etc/httpd/sites-enabled* at t
254
254
255
255
That is by design, so that you can remove things when or if`httpd` fails to restart. To enable our configuration file, you need to create a symbolic link to that file in*sites-enabled* and start or restart the web service. To do this, you use this command:
This will create the link to the configuration file in*sites-enabled*.
263
262
264
263
Now just start `httpd` with `systemctl start httpd`. Or restart it if it is already running: `systemctl restart httpd`, and assuming the web service restarts, you can now go and do some testing on your site.
0 commit comments