#303 Technical review on getting-started-with-apache-http-server
Merged 3 years ago by pbokoc. Opened 3 years ago by copperi.
fedora-docs/ copperi/quick-docs technical_review  into  master

@@ -1,7 +1,7 @@ 

  [id='adding-repositories']

  = Adding repositories

  

- This section describes how to add software repositories with the `dnf config-manger` command.

+ This section describes how to add software repositories with the `dnf config-manager` command.

  

  Use the following commands as the `root` user or under the `sudo` utility.

  
@@ -11,11 +11,11 @@ 

  +

  [literal,subs="+quotes,attributes"]

  ----

- # dnf config-manager --add-repo _repository_

+ dnf config-manager --add-repo _repository_

  ----

  +

  Replace `_repository_` with the path to the created `.repo` file, for example:

  +

  ----

- # dnf config-manager --add-repo /etc/yum.repos.d/fedora_extras.repo

+ dnf config-manager --add-repo /etc/yum.repos.d/fedora_extras.repo

  ----

@@ -7,20 +7,20 @@ 

  

  As a best practice, do not modify `/etc/httpd/conf/httpd.conf` or any of the `/etc/httpd/conf.d` files shipped by Fedora packages directly. If you make any local changes to these files, then any changes to them in newer package versions will not be directly applied. Instead, a `.rpmnew` file will be created, and you will have to merge the changes manually.

  

- It is recommended to create a new file in `/etc/httpd/conf.d` which will take precedence over the file you wish to modify, and edit the required settings. For instance, to change a setting specified in `/etc/httpd/conf.d/foo.conf` you could create the file `/etc/httpd/conf.d/z-foo-local.conf`, and place your setting in that file.

+ It is recommended to create a new file in `/etc/httpd/conf.d/` which will take precedence over the file you wish to modify, and edit the required settings. For instance, to change a setting specified in `/etc/httpd/conf.d/foo.conf` you could create the file `/etc/httpd/conf.d/z-foo-local.conf`, and place your setting in that file.

  

  [NOTE]

  ====

  After making any changes to your server configuration, execute the following command:

  

  ----

- # apachectl reload

+ sudo systemctl reload httpd.service

  ----

  

  Certain changes may require Apache to be fully restarted. To fully restart Apache, execute the following command:

  

  ----

- # systemctl restart httpd.service

+ sudo systemctl restart httpd.service

  ----

  ====

  
@@ -99,13 +99,13 @@ 

  * For plain HTTP connections:

  +

  ----

- # firewall-cmd --permanent --add-service=http

+ sudo firewall-cmd --permanent --add-service=http

  ----

  

  * For TLS/SSL connections:

  +

  ----

- # firewall-cmd --permanent --add-service=https

+ sudo firewall-cmd --permanent --add-service=https

  ----

  

  To allow Apache through the firewall instantly:
@@ -113,13 +113,13 @@ 

  * For plain HTTP connections:

  +

  ----

- # firewall-cmd --add-service=http

+ sudo firewall-cmd --add-service=http

  ----

  

  * For TLS/SSL connections:

  +

  ----

- # firewall-cmd --add-service=https

+ sudo firewall-cmd --add-service=https

  ----

  

  NOTE: If your server is running in a network with a NAT router, you will also need to configure your router to forward the HTTP and HTTPS ports to your server, if you wish to allow access from outside your local network.

@@ -6,13 +6,13 @@ 

  . Install *HTTPD* packages.

  +

  ----

- # dnf install httpd -y

+ sudo dnf install httpd -y

  ----

  

  . Start the *HTTPD* service.

  +

  ----

- # systemctl start httpd.service

+ sudo systemctl start httpd.service

  ----

  

  [NOTE]
@@ -20,7 +20,7 @@ 

  To enable auto start of *HTTPD* service at boot, execute the following command:

  

  ----

- # systemctl enable httpd.service

+ sudo systemctl enable httpd.service

  ----

  ====

  

@@ -14,7 +14,7 @@ 

  Most web applications are simply packaged according to their name. For instance, you can install Wordpress by executing the following command:

  

  ----

- # dnf install wordpress

+ sudo dnf install wordpress

  ----

  

  Packaged web applications will usually provide Fedora-specific instructions in a documentation file. For instance, Wordpress provides the files `/usr/share/doc/wordpress/README.fedora` and `/usr/share/doc/wordpress/README.fedora-multiuser`.

@@ -18,7 +18,7 @@ 

  The https://apps.fedoraproject.org/packages/mod_ssl[mod_ssl] package will be automatically enabled post installation. Install the https://apps.fedoraproject.org/packages/mod_ssl[mod_ssl] package using the following command:

  

  ----

- # dnf install mod_ssl -y

+ sudo dnf install mod_ssl -y

  ----

  

  
@@ -37,8 +37,8 @@ 

  . Move the certificate and the key file to the correct folder

  +

  ----

- # mv key_file.key /etc/pki/tls/private/myhost.com.key

- # mv certificate.crt /etc/pki/tls/certs/myhost.com.crt

+ sudo mv key_file.key /etc/pki/tls/private/myhost.com.key

+ sudo mv certificate.crt /etc/pki/tls/certs/myhost.com.crt

  ----

  +

  . Ensure that the following parameters are correct:
@@ -46,22 +46,22 @@ 

  .. SELinux contexts

  +

  ----

- # restorecon /etc/pki/tls/private/myhost.com.key

- # restorecon /etc/pki/tls/certs/myhost.com.crt

+ restorecon /etc/pki/tls/private/myhost.com.key

+ restorecon /etc/pki/tls/certs/myhost.com.crt

  ----

  +

  .. Ownership

  +

  ----

- # chown root.root /etc/pki/tls/private/myhost.com.key

- # chown root.root /etc/pki/tls/certs/myhost.com.crt

+ sudo chown root.root /etc/pki/tls/private/myhost.com.key

+ sudo chown root.root /etc/pki/tls/certs/myhost.com.crt

  ----

  +

  .. Permissions

  +

  ----

- # chmod 0600 /etc/pki/tls/private/myhost.com.key

- # chmod 0600 /etc/pki/tls/certs/myhost.com.crt

+ sudo chmod 0600 /etc/pki/tls/private/myhost.com.key

+ sudo chmod 0600 /etc/pki/tls/certs/myhost.com.crt

  ----

  

  After installing the existing certificate, set up the certificate using <<mod_ssl configuration>>.

@@ -5,8 +5,6 @@ 

  [id='adding-or-removing-software-repositories-in-fedora']

  = Adding or removing software repositories in Fedora

  

- include::{partialsdir}/unreviewed-message.adoc[]

- 

  This section describes how to add, enable, or disable a software repository with the DNF application.

  

  include::{partialsdir}/proc_adding-repositories.adoc[leveloffset=+1]

@@ -3,8 +3,6 @@ 

  [id='getting-started-with-apache-http-server']

  = Getting started with Apache HTTP Server

  

- include::{partialsdir}/unreviewed-message.adoc[]

- 

  The Apache HTTP Server is one of the most commonly-used web servers. This section acts as a quick-start guide to deploying and configuring Apache on Fedora.

  

  include::{partialsdir}/proc_installing-httpd.adoc[leveloffset=+1]

Technical review completed and is now accurate.

Added sudo to lines where needed
Changed "apachectl reload" to "sudo systemctl reload httpd.service"
Added / to the end of /etc/httpd/conf.d
Removed "needs review" section.

2 new commits added

  • removed needs review section
  • Technical review done, fixed a typo
3 years ago

Added a technical review on "adding-or-removing-software-repositories-in-fedora"

rebased onto 7973ecb3fe9f54eff40a02c3d75c3a170a6e0d1b

3 years ago

rebased onto ea88eb7163000960b94d1bcdfafe42dd207a3e30

3 years ago

rebased onto 9c5a05f126066b9372cd921f096bbc6da374888c

3 years ago

@mattdm Who should handle this PR ?

rebased onto fb31f63

3 years ago

(Fixes #206)

Hi @copperi, I have a small change request: Can you remove the # and $ prompts from all lines with command examples? We used to do that before to indicate whether you need to be root or not for each command, but a while ago Fedora enabled sudo by default so we just add sudo when it's needed.

6 new commits added

  • Fix conflicts
  • Removed the # and $ prompts from command examples
  • deleted an extra file
  • Technical review on getting-started-with-apache-http-server
  • Added missing sudo statement.
  • Did a technical review and corrected commands as needed. File is now accurate.
3 years ago

pretty please pagure-ci rebuild

3 years ago

pretty please pagure-ci rebuild

3 years ago

Hi @ pbokoc, removed # and $ prompts as requested.

Looks good, thank you!

Pull-Request has been merged by pbokoc

3 years ago