From 0d28de860b229c46a8becbd61d8950a98e609c79 Mon Sep 17 00:00:00 2001 From: Jan Kuparinen Date: Tue, 26 Jan 2021 07:21:07 +0200 Subject: [PATCH] Removed the # and $ prompts from command examples --- .../_partials/proc_adding-repositories.adoc | 4 ++-- .../proc_configuring-apache-httpd.adoc | 12 ++++++------ .../pages/_partials/proc_installing-httpd.adoc | 6 +++--- .../_partials/proc_installing-webapps.adoc | 2 +- .../_partials/proc_securing-apache-httpd.adoc | 18 +++++++++--------- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/modules/ROOT/pages/_partials/proc_adding-repositories.adoc b/modules/ROOT/pages/_partials/proc_adding-repositories.adoc index 4b1ac7a..6a9c98e 100644 --- a/modules/ROOT/pages/_partials/proc_adding-repositories.adoc +++ b/modules/ROOT/pages/_partials/proc_adding-repositories.adoc @@ -11,11 +11,11 @@ Use the following commands as the `root` user or under the `sudo` utility. + [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 ---- diff --git a/modules/ROOT/pages/_partials/proc_configuring-apache-httpd.adoc b/modules/ROOT/pages/_partials/proc_configuring-apache-httpd.adoc index d621392..3c9572d 100644 --- a/modules/ROOT/pages/_partials/proc_configuring-apache-httpd.adoc +++ b/modules/ROOT/pages/_partials/proc_configuring-apache-httpd.adoc @@ -14,13 +14,13 @@ It is recommended to create a new file in `/etc/httpd/conf.d/` which will take p After making any changes to your server configuration, execute the following command: ---- -# sudo systemctl reload httpd.service +sudo systemctl reload httpd.service ---- Certain changes may require Apache to be fully restarted. To fully restart Apache, execute the following command: ---- -# sudo systemctl restart httpd.service +sudo systemctl restart httpd.service ---- ==== @@ -99,13 +99,13 @@ To allow Apache through the firewall at each boot: * For plain HTTP connections: + ---- -# sudo firewall-cmd --permanent --add-service=http +sudo firewall-cmd --permanent --add-service=http ---- * For TLS/SSL connections: + ---- -# sudo firewall-cmd --permanent --add-service=https +sudo firewall-cmd --permanent --add-service=https ---- To allow Apache through the firewall instantly: @@ -113,13 +113,13 @@ To allow Apache through the firewall instantly: * For plain HTTP connections: + ---- -# sudo firewall-cmd --add-service=http +sudo firewall-cmd --add-service=http ---- * For TLS/SSL connections: + ---- -# sudo 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. diff --git a/modules/ROOT/pages/_partials/proc_installing-httpd.adoc b/modules/ROOT/pages/_partials/proc_installing-httpd.adoc index 63c784c..376c737 100644 --- a/modules/ROOT/pages/_partials/proc_installing-httpd.adoc +++ b/modules/ROOT/pages/_partials/proc_installing-httpd.adoc @@ -6,13 +6,13 @@ This procedure describes the steps to install Apache *HTTPD* on Fedora. . Install *HTTPD* packages. + ---- -# sudo dnf install httpd -y +sudo dnf install httpd -y ---- . Start the *HTTPD* service. + ---- -# sudo systemctl start httpd.service +sudo systemctl start httpd.service ---- [NOTE] @@ -20,7 +20,7 @@ This procedure describes the steps to install Apache *HTTPD* on Fedora. To enable auto start of *HTTPD* service at boot, execute the following command: ---- -# sudo systemctl enable httpd.service +sudo systemctl enable httpd.service ---- ==== diff --git a/modules/ROOT/pages/_partials/proc_installing-webapps.adoc b/modules/ROOT/pages/_partials/proc_installing-webapps.adoc index 5d7a66e..04ded0f 100644 --- a/modules/ROOT/pages/_partials/proc_installing-webapps.adoc +++ b/modules/ROOT/pages/_partials/proc_installing-webapps.adoc @@ -14,7 +14,7 @@ They will also often have the default configuration tweaked according to Fedora' Most web applications are simply packaged according to their name. For instance, you can install Wordpress by executing the following command: ---- -# sudo 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`. diff --git a/modules/ROOT/pages/_partials/proc_securing-apache-httpd.adoc b/modules/ROOT/pages/_partials/proc_securing-apache-httpd.adoc index 7074cc7..c35a5a5 100644 --- a/modules/ROOT/pages/_partials/proc_securing-apache-httpd.adoc +++ b/modules/ROOT/pages/_partials/proc_securing-apache-httpd.adoc @@ -18,7 +18,7 @@ To enable TLS/SSL support, download and install one of the following packages: 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: ---- -# sudo dnf install mod_ssl -y +sudo dnf install mod_ssl -y ---- @@ -37,8 +37,8 @@ If you already have a certificate generated on another computer, do the followin . Move the certificate and the key file to the correct folder + ---- -# sudo mv key_file.key /etc/pki/tls/private/myhost.com.key -# sudo 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 @@ If you already have a certificate generated on another computer, do the followin .. 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 + ---- -# sudo chown root.root /etc/pki/tls/private/myhost.com.key -# sudo 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 + ---- -# sudo chmod 0600 /etc/pki/tls/private/myhost.com.key -# sudo 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 <>.