Linux RHCE - Web Server - Apache Web Server

MarGib July 18, 2026
🌐 🇵🇱 Polski · 🇬🇧 EN
Apache is the most popular and widely used web server on the internet. It is available for many operating systems such as UNIX, LINUX, Microsoft Windows, BSD, OS X and appears as a component of many packages offering additional software like PHP or databases, e.g., XAMPP, LAMP, WAMP, etc. The project's homepage is http://httpd.apache.org/. The main features of the server are multithreading, scalability, security, access control, CGI, proxy, and module support, including mod_ssl. The first version was officially released in April 1995. Currently, the latest server releases already include a graphical configuration interface that parses settings into the httpd.conf file. 


APACHE SERVER INSTALLATION 

Step 1 - Installing required packages

# yum install -y httpd mod_ssl

Step 2 - Verifying that all necessary packages are in the system

# rpm -qa | grep http
httpd-tools-2.2.15-15.el6.i686
httpd-2.2.15-15.el6.i686

# rpm -qa | grep ssl
openssl-1.0.0-20.el6.i686
mod_ssl-2.2.15-15.el6.i686

Step 3 - Setting services to start with the operating system 

# chkconfig httpd on

Step 4 - Verifying the changes made 

# chkconfig --list httpd
httpd   0:off   1:off   2:on    3:on    4:on    5:on    6:off

WEB SERVER CONFIGURATION 

After installing the appropriate packages, we can focus on the configuration files and their locations. During installation, the /var/www directory was created, which is where we place website files. There are also several configuration files such as:

/etc/httpd/conf/httpd.conf          Main configuration file 

/var/log/httpd                                      Web server logs

/usr/lib64/httpd/modules                 Modules for the Apache server

After installing the server, its configuration located in the main configuration file is ready to use immediately. However, it is worth familiarizing yourself with the available options that can be configured, as there are quite a few, and they are all well-documented. The information in the file is grouped into sections. 

Basic global configuration options: 

ServerRoot          - Location for storing configuration files 

Timeout                - Time period between requests after which the connection is terminated 

Listen                    - Listening port number 

User                      - User under which the web server service is run

Group                    - Group under which the web server is run

LoadModule           - Definition of modules loaded at web server startup

Basic options for the web server

DocumentRoot       - Location of website files 

ServerName           - Definition of server name, IP address, and port number 

Let's start with the configuration related to the location of website files. By default, it is /var/www/html, but if necessary, we can change it.

In the main configuration file, we can also find a section named "Directory": 

<Directory "/var/www/html">

    Options Indexes FollowSymLinks

    AllowOverride None

    Order allow,deny
    Allow from all

</Directory>

The parameters defined here indicate the location where the website files will be found, but if we want to change the location for website files, it must be done in: 

DocumentRoot "/var/www/html"

This also applies to the configuration of virtual hosts, which will be discussed later. If the configuration is satisfactory and we agree with the set parameters, we can perform a test to check the configuration file for syntax errors: 

# service httpd configtest
httpd: Could not reliably determine the server's fully qualified domain name, using RHEL01.example.com for ServerName
Syntax OK
The above error concerns an unset server name matching the host the server is on; after uncommenting the appropriate option and providing the suggested server name, the error was resolved. 

# service httpd configtest
Syntax OK

If we want to restart the server, we use the command: 

# service httpd restart
Stopping httpd:                                     [  OK  ]
Starting httpd:                                     [  OK  ]

We can also reload the server configuration files without restarting the entire service using: 

# service httpd reload

There is one more option for restarting the server that allows loading new configuration files without disconnecting a single client currently using the web service. 

# service httpd graceful

IPTABLES AND SELINUX CONFIGURATION  

Step 1 - Adding appropriate iptables firewall rules 

iptables -I INPUT 5 -p tcp -m tcp --dport 80 -j ACCEPT

Step 2 - Saving iptables settings 

# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]

Step 3 - Restarting the system firewall service 

# service iptables restart
iptables: Flushing firewall rules:                     [  OK  ]
iptables: Setting chains to policy ACCEPT: filter      [  OK  ]
iptables: Unloading modules:                           [  OK  ]
iptables: Applying firewall rules:                     [  OK  ]

The above setting opens port 80, on which the service runs, for everyone. However, it is often the case that for some reason we need to block a subnet and leave service access only to selected subnets or hosts. 

To make httpd service access possible only for a given subnet, we can introduce a restriction in the form of: 

iptables -I INPUT -s 192.168.56.0/24 -p tcp --dport 80 -j ACCEPT

This entry will restrict access for hosts located in the 192.168.56.0/24 subnet. 

We can also go further and apply a restriction to a single host 

iptables -I INPUT -s 192.168.56.102 -p tcp --dport 80 -j ACCEPT

Now you can only see the websites while being on the local host or 192.168.56.102

Going even further, we have the ability to block access on the local host as well and leave it only from a specific selected machine or subnet. Blocking access from the local machine can be done by blocking the local IP address, e.g., (192.168.56.101)

iptables -I INPUT -s 192.168.56.101 -p tcp --dport 80 -j REJECT

This entry will also block access to websites from the host the server is on. 


SELINUX OPTIONS 

httpd_can_network_relay - Allows httpd to act as a relay

htttp_can_network_connect_db - Allows httpd scripts and modules to connect to a database.

httpd_use_gpg - Allows httpd to enable gpg in the gpg-web domain

httpd_enable_cgi - Allows support for CGI

httpd_use_cifs - Allows httpd to have access to CIFS

allow_httpd_mon_auth_pam - Allows the use of mod_auth_pam

allow_httpd_anon_write - Allows modification of public files

httpd_enable_homedirs - Enables reading of home directories

allow_httpd_sys_scripts_anon_write - Allows apache scripts to modify the content of a public directory; the directory must have the public_rw_content_t context

httpd_dbus_avahi - Enables communication with the avahi service

httpd_unified - Unification of handles for all file contents

httpd_can_network_connect - Allows httpd scripts and modules to connect to the network via TCP

allow_httpd_mod_auth_ntlm_winbind - Allows the use of mod_auth_pam

httpd_tty_comm - Unified communication with the terminal.

httpd_read_user_content - Allows access to user files

httpd_use_nfs - Access to NFS file systems

httpd_tmp_exec - Access to files in the /tmp directory

httpd_execmem - Allows adding /execmem and /execstak modules

httpd_can_sendmail - Allows the httpd service to send emails

httpd_builtin_scripting - Allows the httpd service to use scripts, usually PHP

httpd_can_check_spam - Spam checking by httpd

httpd_can_network_connect_cobbler - Allows scripts and modules to have a connection to the cobbler network

httpd_ssi_exec - Allows httpd to run SSI in the same domain as CGI scripts

httpd_enable_ftp_server - Allows httpd access to an FTP server and listing files via the FTP port

httpd_setrlimit - Allows the httpd service to change system limits.

To run a basic web service on your own network, there is no need to make any changes to the configuration files. Almost every new option not included in the basic settings requires configuring SELinux settings. When working with web services, one must remember the existence of an additional requirement in the form of SELinux. Apache uses file contexts due to the existence of different content available on the disk.

The context of every newly created directory must be set to the httpd server user so that it can gain proper access to it. 

Let's assume, for example, that we need to create two new directories intended for two separate clients: 

Step 1 - Creating directories for clients:

# mkdir /var/www/strona1
# mkdir /var/www/strona2

Step 2 - Checking what contexts we currently have for files:


# ls -Z /var/www/
drwxr-xr-x. root root system_u:object_r:httpd_sys_script_exec_t:s0 cgi-bin
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 error
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 html
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 icons
drwxr-xr-x. root root unconfined_u:object_r:httpd_sys_content_t:s0 strona1
drwxr-xr-x. root root unconfined_u:object_r:httpd_sys_content_t:s0 strona2


The contexts for client directories need to be changed to match the defaults for websites (html location)

Step 3 - Using the chcon command, we change the context for the domain user


# chcon -Rvu system_u /var/www/strona1
changing security context of `/var/www/strona1'

# chcon -Rvu system_u /var/www/strona2
changing security context of `/var/www/strona2'

Step 4 - We can also refer to the default directory with one command 

# chcon --reference /var/www/html/ /var/www/strona2 

This is a transfer of the set context on a known file, in this case, the default set context of the html directory, where after installation you can place website files, to another selected or newly created directory that will also have the task of storing website files. 

Step 5 - Now we can check the correctness of the contexts for the new locations 

# ls -Z /var/www/
drwxr-xr-x. root root system_u:object_r:httpd_sys_script_exec_t:s0 cgi-bin
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 error
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 html
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 icons
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 strona1
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 strona2


TROUBLESHOOTING APACHE

One of the best tools for troubleshooting Apache are log files. Apache server log files have a separate location from system logs to make them easier to find. We have two basic files that we can analyze to resolve problems with the Apache server. 

  • /var/log/httpd/access_log          Log of all accesses to the server 
  • /var/log/httpd/error_log            Information about server errors 
Usually, analyzing the above files provides sufficient information to resolve problems. In the main configuration file, there is a section that allows setting the logging level for the httpd service. 

If we use secure sites, there are three additional files for SSL: 
  • /var/log/httpd/ssl_access_log          Logging access to a secure site 
  • /var/log/httpd/ssl_error_log            Logging information about errors with the ssl site 
  • /var/log/httpd/ssl_request_log         Logging requests from the client to the server
As we already know, to check the syntax correctness of the main configuration file, we use the "config-test" command. One of the common errors when starting the service is a message stating that the "ServerName" has not been set, so the server defaults to 127.0.0.1. To get rid of this inconvenience, we set the server name. We can also set the amount of information contained in the logs using the "LogLevel" parameter in the main configuration file. 


ELINKS

Another useful tool that can be helpful when troubleshooting Apache is the "elinks" web browser. It is a text-based browser that allows you to quickly check if a website is working. To use this tool, we must install additional packages.

Step 1 - Installing required packages

# yum install -y elinks

Step 2 - After installation, we can test the site's operation by issuing the command: 

elinks 192.168.56.101

We should see the content of the file: /var/www/html/index.html 

We can also check SSL operation 

# elinks https://172.168.1.1

For now, it won't work yet! 

APACHE SECURITY

Above, we have already presented how to add rules to the firewall and the principles of SELinux contexts. Here, security methods and configuration settings regulating access to the web server service will be discussed in even more detail. 

Securing the service on the host 

The first way to secure it is to restrict access to the httpd server from a specific subnet. We do this by entering options in the "Listen" parameter in the main configuration file: 

Listen <server_IP_address>:<port> 

Listen 192.168.56.101:80 

After restarting the server service, the sites will only be available from the specified subnet. 

Another way to secure it is the <Directory> directive in the main configuration file: 

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from 192.168.56.102
</Directory>

Such an entry in the configuration file restricts access to the /var/www/html directory and its contents. Access is possible only from the selected host, in this case, it is host 192.168.56.102

Other possible configurations are: 

Access restricted to a given domain: 

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from .example.com
</Directory>

Note that the domain name is provided starting with a dot! 

Access restricted to a given subnet 

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from 192.168.1
</Directory>

Note that the address should end at the 3rd octet without a dot

After specifying the hosts that should or should not have access to the web server, you need to define the order in which the rules are applied. 

Order allow, deny         Selected addresses will be allowed first 
Order deny, allow         Access denial will be performed first.

If we want to allow a given address, we use the option that we first allow the given address and block the rest; alternatively, if we want to block a given address, we block it at the beginning and allow the rest. 

In this directive, there are also options: 

Option Indexes - If the index.html file does not exist, the listed content of the directory will appear on the page

FollowSymLinks   - You can create a symbolic link in the operating system where you point to another directory outside of the one defined in the directive. 

AllowOverride   - Does not allow regular users to change root files 

The above options can be applied to other directories with different options set relative to each other. There is also a <Directory> section without a defined directory, and all options set in it will be superiorly applied to all others below. 

Securing the service from the client side 

Here, we will secure a given directory by giving access only to selected users. There are the following options for restricting access to users: 

AuthType     - Defines the authentication type 

AuthName    - Defines the comment displayed to the user when logging in 

AuthUserFile - Sets the file used to store user logins and passwords 

AuthGroupFile - Sets the file to store logins and passwords for a group 

Require - Sets which groups and users can log in

We will practice the above with an example. We secure the main page provided by the web server, making it available only to user User01. 

Step 1 - In the <Directory> directive, we add the parameters: 

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from 192.168.56.102
    AuthType Basic
    AuthName "Secured page not for you"
    AuthUserFile /etc/httpd/userfile
    Require user user01

</Directory>


Step 2 - Creating the userfile  file

# htpasswd -cm /etc/httpd/userfile user01
New password:
Re-type new password:
Adding password for user user01

The -c option causes the file to be created, and we use it once if the file does not exist yet. The next option, -m, uses MD5 encryption when saving passwords to the file, so they are not stored in plain text. 

Step 3 - Restarting the web server

# service httpd restart

Step 4 - Checking operation in the browser 

We should be asked for a login and password, and after entering the password and login, we will see the page. 

Another option is to allow access to the main page, while requiring login when opening other subpages. 

Step 1 - In the configuration file, we make further changes 

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride authconfig
    Order allow,deny
    Allow from 192.168.56.1
    AuthType Basic
    AuthName "Secured page not for you"
    AuthUserFile /etc/httpd/userfile
    Require user user01
</Directory>

Step 2 - Creating a location with a subpage 

In the /var/www/html directory, we create a new directory: # mkdir katalog in which the secured page will be. 

Step 3 - In the created directory, we create a .htaccess file 

# vi .htaccess

entering the content into the file: 

AuthType Basic
AuthName "You do not have access to this file without logging in"
AuthGroupFile /etc/httpd/groupfile
Require group hr_users

Step 4 - Creating several users 

# htpasswd -m /etc/httpd/userfile hr01
New password:
Re-type new password:
Adding password for user hr01

# htpasswd -m /etc/httpd/userfile hr02
New password:
Re-type new password:
Adding password for user hr02

Step 5 - Creating the groupfile  file

We create the file: # vim /etc/httpd/groupfile in which we enter: 

hr_users: hr01 hr02

Step 6 - Restarting the web server

# service httpd restart 

Step 7 - Checking operation 

In the browser, you can see the main page, but after going to the directory, there will be a request to log in. 

Sharing pages from user home directories

We can also enable sharing pages from user home directories on the web server. 

To do this, you must: 

# mkdir public_html   (create a subdirectory in the user's home directory) 

# chmod 701 /home/user01/

# chmod 705 -R /home/user01/public_html/

After doing the above, you need to check the SELinux settings 

# getsebool -a | grep httpd
allow_httpd_anon_write --> off
allow_httpd_mod_auth_ntlm_winbind --> off
allow_httpd_mod_auth_pam --> off
allow_httpd_sys_script_anon_write --> off
httpd_builtin_scripting --> on
httpd_can_check_spam --> off
httpd_can_network_connect --> off
httpd_can_network_connect_cobbler --> off
httpd_can_network_connect_db --> off
httpd_can_network_memcache --> off
httpd_can_network_relay --> off
httpd_can_sendmail --> off
httpd_dbus_avahi --> on
httpd_enable_cgi --> on
httpd_enable_ftp_server --> off
httpd_enable_homedirs --> off
httpd_execmem --> off
httpd_read_user_content --> off
httpd_setrlimit --> off
httpd_ssi_exec --> off
httpd_tmp_exec --> off
httpd_tty_comm --> on
httpd_unified --> on
httpd_use_cifs --> off
httpd_use_gpg --> off
httpd_use_nfs --> off

 By changing the appropriate option: 

# setsebool -P httpd_enable_homedirs=1

Checking the changes made: 

# getsebool -a | grep httpd
...
httpd_enable_homedirs --> on 
...

Now you can check the operation in the browser:

http://192.168.56.101/~user01/

Remember to use the ~ sign before the username.

HTTPS CONFIGURATION - SSL 

Besides normal sites, we can also have secure sites using the HTTPS protocol. Configuring secure sites in Apache is simple. For secure sites, we need the mod_ssl package, so if it is not in the system, it must be installed. If the package is installed in the system, we will have access to the configuration file /etc/httpd/conf.d/ssl.conf, which contains configuration parameters for securing the web server. 

Let's check what we can configure in this file:

# grep -v ^# /etc/httpd/conf.d/ssl.conf

LoadModule ssl_module modules/mod_ssl.so

Listen 443

SSLPassPhraseDialog  builtin
SSLSessionCache         shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout  300
SSLMutex default
SSLRandomSeed startup file:/dev/urandom  256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin
<VirtualHost _default_:443>
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
    SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0
CustomLog logs/ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>


The most important options in this file are: Listen and the parameters defined between the <VirtualHost _default_:443></VirtualHost> tags.

By default, secure sites are placed on virtual hosts (which is very good because they can operate independently of existing sites)

You should also pay attention to two options:

SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key


These options define and point to the location of files containing the keys used for sharing secure sites. Although the default options will work as they are after installation, if we change the IP address or the pair of domain names, it becomes necessary to generate a new certificate and key. To generate certificates and keys, you must install the crypto-utils package. Generating keys and certificates is not a topic for the RHCE exam. 


Step 1 - Creating iptables firewall rules

# iptables -I INPUT 5 -p tcp -m tcp --dport 443 -j ACCEPT
# iptables -I INPUT 5 -p tcp -m tcp --dport 80 -j ACCEPT   
      (if it wasn't opened earlier)

Step 2 - Saving iptables settings

# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
[root@RHEL01 ~]# service iptables restart
iptables: Flushing firewall rules:                         [ OK ]
iptables: Setting chains to policy ACCEPT: filter          [ OK ]
iptables: Unloading modules:                               [ OK ]
iptables: Applying firewall rules:                         [ OK ]

Step 3 - Restarting the iptables service 

# service iptables restart
iptables: Flushing firewall rules:                         [ OK ]
iptables: Setting chains to policy ACCEPT: filter          [ OK ]
iptables: Unloading modules:                               [ OK ]
iptables: Applying firewall rules:                         [ OK ]


CGI APPLICATION 


Here, in a few steps, I will show how to run a CGI application in the Apache server. 

Step 1 - Creating a directory for the application 

# mkdir /var/www/web-app

Step 2 - Placing a file with a sample application in the created directory 

# cd /var/www/webapp 

# vim app.sh 

app.sh 

            #!/usr/bin/perl

            print "Content-type: text/html\n\n";

            print "Hello, world!\n";

Step 3 - In the configuration file /etc/httpd/conf/httpd.conf, we add the entry: 

ScriptAlias /webapp "/var/www/webapp"
<Directory "/var/www/webapp/">

        Options ExecCGI FollowSymLinks
        Order allow,deny
        Allow from all

</Directory>

Step 4 - Checking if the file syntax is correct 

# service httpd configtest
Syntax OK

Step 5 - Setting appropriate permissions on the directory 

# chmod -R 755 /var/www/webapp/

Step 6 - Restarting the web server service 

# service httpd restart 


VIRTUAL HOSTS 

A great advantage of the Apache web server is the ability to run multiple sites on one web server. This is done by configuring virtual hosts. The configuration is located in the main Apache configuration file httpd.conf in the third section: 

NameVirtualHost - Specifies the name or IP address for the virtual host 

ServerAdmin - Specifies the email address for the webmaster 

DocumentRoot - specifies the directory for virtual host files 

ServerName - Defines the URL for the virtual host 

ErrorLog - specifies the error log file location 

CustomLog - specifies the custom log location 

To run a virtual host in the Apache server, you need to add the following entry in the last part of the httpd.conf configuration file:

Uncomment the line: NameVirtualHost *:80


<VirtualHost *:80>

</VirtualHost>

By creating an empty virtual host, we prevent overwriting settings for the local web server, so that after entering the site address leading to files located in the default /var/www/html location, the sites will work correctly. Next, we configure the virtual host.

<VirtualHost *:80>

    ServerAdmin webmaster@station1.example.com
    DocumentRoot /StronyWWW/
    ServerName stronywww.example.com
    ErrorLog logs/stronywww.example.com-error_log
    CustomLog logs/stronywww.example.com-access_log common

        <Directory "/StronyWWW" >

                AllowOverride None
                Order Allow,Deny
                Allow from 192.168.0

        </Directory>

</VirtualHost>

Pay attention to the lines:

ServerName - the site address under which the files will be visible

<Directory "/file location" > - the path to the web files for the given virtual host

Allow from - specifying who has permission to view the sites. 


Also, remember that the created directory, in this case /Stronywww , must have the appropriate SELinux context.

 system_u:object_r:httpd_sys_content_t:s0 StronyWWW

We can take care of the appropriate context by referring to it with the chcon command:

chcon --reference /var/www/html/ /StronyWWW/

The above configuration allows viewing sites from the default directory and from the /Stronywww directory at the address http://stronywww.example.com (remember to add appropriate entries to the /etc/hosts files on the machines from which you will test the operation). 

Securing access to a virtual host is done the same way as in the default server, i.e., by setting appropriate parameters in the <Directory> directive. 

AllowOverride authconfig

and creating a .htaccess file in which we add sample entries: 

AuthType Basic
AuthName "You do not have access to this file without logging in"
AuthUserFile /Stronywww/.userfile
Require user user01


Creating the .userfile  file


# htpasswd -cm /Stronywww/.userfile user01
New password:
Re-type new password:
Adding password for user user01

CGI applications in virtual hosts

Step 1 - Creating a directory for your own application 

# mkdir /var/www/moje-cgi 

Step 2 - Setting the correct context 

# chcon --reference /var/www/cgi-bin /var/www/moje-cgi

Step 3 - Creating the application and placing it in the /var/www/moje-cgi directory

# vim /var/www/moje-cgi/app.pl 

in the app.pl file enter:


#!/usr/bin/perl

print "Content-type: text/html\n\n";

print "Hello, world!\n";

Step 4 - Giving the application execution permissions 

# chmod +x /var/www/moje-cgi/app.pl

Step 5 - In the /etc/httpd/conf/httpd.conf file, we create a virtual host by adding the entry: 

<VirtualHost *:80>
    ServerAdmin webmaster@aplikacja.example.com
    DocumentRoot /var/www/moje-cgi
    ServerName aplikacja.example.com
    ErrorLog logs/aplikacja.example.com-error_log
    CustomLog logs/aplikacja.example.com-access_log common

        ScriptAlias /cgi-bin/ /var/www/moje-cgi/

        <Directory "/var/www/moje-cgi/">

                Options +ExecCGI
                AddHandler cgi-script cgi pl

        </Directory>
</VirtualHost>

Special attention should be paid to the entries contained between the <Directory></Directory> tags. It is important to remember the dash that appears in the AddHandler cgi-script cgi pl line. Without the dash, during the http service restart, we will not see any error or information about bad syntax. It is different if the final cgi pl are missing, in which case we will see an error.  

After saving the httpd.conf file and restarting the httpd service, you can see the result: 

# elinks http://aplikacja.example.com/app.pl

Remembering to add the appropriate entry in the /etc/hosts  file

192.168.56.101 host1.example.com  strona1.example.com strona2.example.com aplikacja.example.com


Facebook X E-mail

Comments

Dodaj komentarz

Explore

Labels

learning 15 Security 13 automation 12 news 11 Anthropic 10 Windows 10 browsers 10 Automation 9 Opera 9 Technology 9 AI ethics 8 Configuration 8 RHCE 8 Software 8 facebook 8 web applications 8 Exam 7 LLM 7 OpenAI 7 chrome 7 coaching 7 curiosities 7 technology 7 www 7 Docker 6 Microsoft 6 Mind 6 Programming 6 Red Hat 6 Web browser 6 cybersecurity 6 entertainment 6 new technologies 6 security 6 AI agents 5 ChatGPT 5 Claude AI 5 Cybersecurity 5 God 5 Performance 5 Productivity 5 algorithms 5 books 5 machine learning 5 network 5 networking 5 open source 5 programming 5 AI 2026 4 CentOS 4 Claude 4 IT security 4 LVM 4 Open Source 4 RH442 4 RHS333 4 Ubuntu 4 Vivaldi 4 Windows 10 4 Windows system administration 4 applications 4 bash 4 containers 4 future of technology 4 future of work 4 health 4 language models 4 mindfulness 4 n8n 4 people 4 photography 4 psychology 4 system administration 4 trivia 4 AI safety 3 Administration 3 Android 3 BIG DATA 3 Business 3 FIFA 3 Firefox 3 Google projects 3 Homelab 3 Installation 3 Kubernetes 3 Local AI 3 Personal Development 3 Personal Finance 3 Privacy 3 Programs 3 Python 3 communication 3 computer science 3 extensions 3 faith 3 ftp 3 games 3 good movie 3 help 3 human 3 interesting websites 3 interface 3 macOS 3 media 3 mental health 3 money 3 open-source 3 opensource 3 personal competencies 3 personal development 3 privacy 3 reading 3 religion 3 tools 3 users 3 virtualization 3 web browser 3 websites 3 AGI 2 AI Act 2 AI assistant 2 AI at work 2 AI benchmarks 2 Apache 2 Asus 2 AutoGen 2 Career 2 Centos 2 Claude 3.5 Sonnet 2 Cloud 2 Codex 2 DNS 2 Debian 2 Debugging 2 DevOps 2 Docker Machine 2 Drones 2 Education 2 Error 2 Fable 2 Free Red Hat 2 GDPR 2 GPT-4 2 Guide 2 Hardware 2 Intel 2 Intelligence 2 Japan 2 JavaScript 2 Job Market 2 Kerberos 2 Kernel 2 Linux kernel 2 Machine Learning 2 Medicine 2 Mythos 2 NIS 2 Navy SEALs 2 Netflix 2 Poland 2 Psychology 2 Puppeteer 2 RAID 2 RHEL7 2 RSS 2 Rocky Linux 2 Rust 2 Sakana AI 2 Security Network Services 2 Self-hosting 2 Servers 2 Software Engineering 2 Ubuntu Server 2 Windows administration 2 Windows errors 2 ansible 2 better life 2 brain 2 brain-computer interfaces 2 chat 2 children 2 cloud storage 2 communicator 2 communities 2 computer intelligence 2 computers 2 conferences 2 courses 2 creativity 2 critical thinking 2 curl 2 cyberattacks 2 data 2 death 2 developer tools 2 digital detox 2 digital hygiene 2 documentary 2 earning 2 emotions 2 file storage 2 file system 2 fix 2 free application 2 free courses 2 free knowledge from the internet 2 free training 2 future of AI 2 future skills 2 genius 2 hacker 2 investments 2 iostat 2 iptables 2 kernel 2 labor market 2 local AI 2 logs 2 mind manipulation 2 mind programming 2 mobile 2 mobile apps 2 mobile phones 2 motivation 2 movie 2 multimedia 2 neurotechnology 2 operating systems 2 optimization 2 overstimulation 2 partitions 2 performance 2 personal thoughts 2 philosophy 2 photos 2 plugin 2 podcast 2 prompt 2 regulations 2 sar 2 scientific facts 2 self-development 2 shell 2 social media 2 software 2 technological innovations 2 technology addiction 2 terminal 2 torrent 2 trick 2 virtualbox 2 wealth 2 weather 2 web 2 wisdom 2 youtube 2 (Treści etykiet nie zostały podane w treści wejściowej) 1 120B models 1 2026 photography market 1 21st Century Skills 1 2FA 1 2nm processors 1 3D printing 1 5 GHz 1 6 GHz 1 64 bit 1 7 1 ACT therapy 1 AF_ALG 1 AGAT 1 AI API key theft 1 AI Agents 1 AI Frameworks 1 AI Governance 1 AI History 1 AI Safety 1 AI addiction 1 AI agent attack 1 AI autonomy 1 AI censorship 1 AI chatbots 1 AI collaboration 1 AI cyber threats 1 AI cybersecurity 1 AI future 1 AI governance 1 AI in Linux 1 AI in art 1 AI in education 1 AI in healthcare 1 AI in industry 1 AI in school 1 AI in science 1 AI in sports 1 AI integration 1 AI interaction 1 AI on mobile devices 1 AI optimization 1 AI regulation 1 AI security 1 AI superchips 1 AI threats 1 AI tool attacks 1 AI tools 1 AI workflows 1 AIMP 1 AMD ROCm 1 AMLD6 1 API 1 API key protection 1 AWS 1 Acquisition 1 Agentjacking 1 Alan Watts 1 Alexander Gerst 1 Alfred 1 AlmaLinux 1 Alpine Linux 1 Amazon Kuiper 1 Andrej Karpathy 1 Anonymous 1 Apple 1 Apple 2025 1 Apple Silicon 1 Aria AI 1 Audacity 4 1 AutoJack 1 Azure 1 BCI 1 Backstage 1 Banking 1 Bash 1 Bazel 1 Bible 1 Big Data 1 Bill Warner 1 Biotechnology 1 Black Mirror 1 Blackwell B100 1 Blockchain 1 Bonding 1 Bono 1 Business and Finance 1 C++ 1 CCPA 1 CPU 1 CUA 1 CUDA 1 CVE-2026 1 Career Development 1 Chat GPT 1 Chemtrails 1 ChildOnlineSafety 1 Claude Cowork 1 Claude Fable 1 Claude Sonnet 5 1 Coaching 1 Computer-Using Agent 1 Constitutional AI 1 Copilot 1 Copilot for Finance 1 Couching 1 CrewAI 1 Cryptocurrencies 1 Cyberbullying 1 DFS 1 DMA 1 DORA 1 DSA 1 Dario Amodei 1 Darwin 1 Data Science 1 Deep Learning 1 Deep Reading 1 DeepSeek 1 Deepseek 1 Deluge 1 Devin AI 1 Diagnostics 1 Digitalization 1 Distributions 1 Docker containers 1 Drivers 1 Dystrybucje 1 E2EE 1 E2EE vulnerabilities 1 EA GAMES 1 EA SPORTS 1 Earth AI 1 Economics 1 Email 1 Emigration 1 Enterprise Linux 1 Entrepreneurship 1 Epicureanism 1 European Funds 1 European Union 1 European technology 1 Excel 1 FIFA 16 1 Facebook 1 Fact-checking 1 Fake News 1 Flannel 1 Flynn Effect 1 Football 1 Formoza 1 Foundation 1 Free 1 Free Software 1 Free software 1 Fugu Ultra 1 Future 1 Future of Finance 1 Future of Work 1 GLM-5.2 1 GPG Tools 1 GPT 1 GPT-4.5 1 GPT-4o 1 GPT-Live 1 GPU Cloud 1 GROM 1 GRUB 1 GUI 1 Gemini 1 Gemma 4 1 Generation Z 1 GhostLock 1 GitHub 1 GitOps 1 Golden Gate 1 Google Assistant 1 Google DeepMind 1 Google Gemma 4 12B 1 Google Research 1 Google activity 1 GoogleFamilyLink 1 Goose 1 Got Talent 1 Gregory Kurtzer 1 Guides 1 HTML 1 Hardware Requirements 1 Health Intelligence 1 Hygge 1 IAM 1 IBM 1 IDE 1 IDE security 1 IQ 1 ISIS 1 ISO 1 ISS 1 IT 1 IT automation 1 IT costs 1 IT history 1 Innovation 1 Intelligent email 1 Internet Browser 1 Internet browser 1 InternetEducation 1 Interview 1 Islam 1 Islamic State 1 Jacquard 1 Jboss 1 Jellyfin 1 JetBrains Marketplace 1 Jetson Thor price 1 Joel Pearson 1 Kali Linux 1 Karen Hao 1 Khan Academy 1 Kimi K3 1 Kodi 1 Kylian Mbappé 1 LLM Deployment 1 Labor Market 1 LangChain 1 Legal regulations 1 LibreOffice 1 Linus Torvalds 1 Linux 7.3 1 Linux automation 1 Linux diagnostics 1 Linux for business 1 Linux system tools 1 Linux task management 1 Linux task scheduling 1 Logs 1 Londoners 1 MAS 1 MCP 1 MFA 1 MLX 1 Maps 1 MarGib_Film 1 Marek Jankowski 1 Mars helicopter 1 Material Design 1 Matt Pocock 1 Microsoft 365 1 Military 1 Mindfulness 1 Mistral AI 1 Miłosz Brzeziński 1 Model Context Protocol 1 Monitoring 1 Moonshot AI 1 MrBallen 1 Multi-Agent Systems 1 My take 1 NATO 1 NFS 1 NIS2 1 NTFS 1 NVIDIA 1 NVIDIA Blackwell 1 NVIDIA Jetson Thor 1 National security 1 Neural Networks 1 New 1 Nginx 1 No comment 1 Node.js 1 Non-profit 1 Notion 1 Nvidia 1 Odysseus 1 OneTrust 1 OpenSSL 1 Opera Air 1 Opera Neon 1 Opera Touch 1 Operating Systems 1 P2P 1 PARP 1 PDF conversion 1 PDF editor 1 PDF merging 1 Pac-Man 1 Pekao S.A 1 Peperclips 1 Perceptron 1 Personal development 1 Philosophy 1 Photoshop 1 Playwright 1 Plex 1 Poland 2026 1 Poles 1 Polish universities 1 PostgreSQL 1 PowerShell 1 Preview 1 Project Maven 1 Project TANGO 1 Proton Drive 1 Proxmox 1 PyTorch 1 Qt Creator 1 Quick Actions 1 Quota 1 Quotes 1 RHEL 1 RHEL8 1 RHSCA 1 RPM 1 Raspberry PI 1 Raspberry Pi 1 Raspbian 1 Raycast 1 Red Hat 8 1 Red Hat Enterprise Linux Developer Suite 1 Red Hat Network Satellite 1 RedHat 8 1 Regex 1 Robo-advisors 1 Routing 1 SMEs 1 SUSE 1 SafeInternet 1 SaferInternetDay 1 Safety 1 Sakana Fugu 1 Search 1 Sector 3.0 Festival 1 Security Auditing 1 September 23 2017 1 Server Administration 1 Signal 1 Smart City 1 Snip. 1 Social Media 1 Soli 1 Solo Projects 1 Solopreneurship 1 Something from myself 1 Sound 1 Sovereign AI 1 Sport 1 Spotify 1 Stacher.IO 1 Stacher.IO installation 1 Starlink 1 Steam Deck 1 Stoicism 1 SysAdmin 1 System Administration 1 Tech 1 Tech Weekly 1 Telegram 1 TensorFlow 1 The Shack 1 Time Management 1 Tips 1 Tokenomics 1 Tools 1 Tribler 1 Tutorial 1 U.S. 1 U.S. government 1 U2 1 UI testing 1 USB 1 UV 1 Ubuntu 26.04 1 VentuSky 1 VirtualBox 1 Virtualization 1 WBC 1 WSL 3 1 WWDC 2026 1 WWDC26 1 Warsaw 1 Weave 1 Web Scraping 1 Websites 1 WhatsApp 1 Wi-Fi 6 1 Wi-Fi 6E 1 Wi-Fi channels 1 Windows update 1 Work 1 Workflow 1 World Cup 1 World Cup 2026 1 World Cup AI 1 World Wide Web 1 X-Files 1 X-files 1 YouTube 1 Yuval Noah Harari 1 ZUS 1 ZenFone 1 Zero-Touch OAuth 1 Zorin OS 1 a drop of motivation 1 about this blog 1 academic fraud 1 access control 1 account security 1 achieving goals 1 ad blocking 1 addiction 1 administrator 1 agent systems 1 aids 1 ampere altra 1 analog photography 1 animations 1 application prototyping 1 arm servers 1 arm64 1 assertiveness 1 astronomy 1 at one-time tasks 1 at vs cron 1 atd daemon 1 audio 1 audio editing 1 authenticity in art 1 authorization 1 autofs 1 automateit 1 automation security 1 automation system attack 1 autonomous cars 1 awareness 1 awk 1 aws graviton 1 bank 1 bash on windows 1 bat files 1 batch 1 battery 1 beliefs 1 beta 1 better living 1 better quality 1 big data 1 bin/bash 1 biodiversity 1 blocking 1 blogger 1 body language 1 bookmarks 1 boot 1 bootable usb 1 boxing 1 browser automation 1 business intelligence 1 c# 1 cache 1 calc 1 campaign 1 cards 1 centralized platforms 1 chemistry 1 child psychology 1 children's emotional development 1 city design 1 clearance 1 cli tools 1 climate change 1 clothing industry 1 cloud 1 cmd 1 code editor 1 cognitive abilities 1 cognitive psychology 1 coldplay 1 command history 1 command line 1 command prompt 1 commando training 1 comments 1 compliance 1 compliance automation 1 compliance tools 1 computer interaction 1 computer performance 1 concentration 1 configuration management 1 conntrack 1 console 1 conspiracy 1 conspiracy theories 1 controversial 1 converter 1 corporate world 1 cost optimization 1 courage 1 courses for free 1 cron 1 cryptography 1 cynics 1 dark mode 1 data security 1 database 1 datasette 1 date and time 1 deep brain stimulation 1 deep learning 1 democracy 1 desertification 1 design patterns 1 design systems 1 developers 1 digital addiction 1 digital clothing 1 digital competencies 1 digital education 1 digital ethics 1 digital habits 1 digital manipulation 1 digitalization 1 disqus 1 document 1 document conversion 1 document signing 1 dreams 1 drop of motivation 1 drought 1 dubai 1 dying 1 e-book 1 eBPF 1 ecology 1 economy 1 ecosystem restoration 1 edge computing 1 elections 1 encryption 1 end of the world 1 end of world 1 end-to-end encryption 1 energy 1 energy efficiency 1 environment and health 1 ethical AI 1 evolution 1 excel 1 exploitation 1 extreme 1 fdisk 1 file sharing 1 file size 1 film zone 1 firewall 1 flash drive 1 flat earth 1 flying 1 food 1 football 1 for sale 1 format change 1 free 1 free software 1 friend location 1 future of architecture 1 future of education 1 future of energy 1 future of humanity 1 future of medicine 1 future of the brain 1 future of the internet 1 future of transport 1 game 1 geoengineering 1 global connectivity 1 google chat 1 graphics 1 graphics editors 1 growing up 1 hacking 1 happiness 1 hard-link 1 hashing 1 hedonic adaptation 1 helion 1 history 1 hivemind 1 hobby 1 home hosting 1 homelab 1 hostname 1 hostnamectl 1 hosts.allow 1 hosts.deny 1 how many people live on earth 1 httpd 1 humanity 1 humor 1 hybrid cloud 1 iOS 1 iPhone 18 Pro 1 iPhone launch 1 iSCSI 1 iftop 1 image generation 1 immortality 1 influencer criticism 1 information manipulation 1 infrastructure 1 infrastructure scalability 1 innovation 1 installation 1 integrations 1 intelligence 1 internet applications 1 investigative journalism 1 investing 1 jailbreaking 1 javascript 1 job market 1 kernel security 1 keyboard shortcuts 1 kuba wojewódzki 1 light 1 limits 1 linux kernel 1 livepatch 1 login 1 loop-audit 1 loop-cost 1 loop-init 1 macOS Sequoia 1 machine cloning 1 magic 1 make life harder 1 making money 1 malicious JetBrains plugins 1 malware in IDE 1 markdown 1 markitdown 1 material design 1 media streaming 1 medicine 1 meditation 1 memory 1 message security 1 messenger 1 meteorology 1 microsoft 1 microtargeting 1 military ethics 1 mobile applications 1 mobile photography 1 model interpretability 1 modern technologies 1 monitoring 1 monorepo 1 mounting 1 mounting image 1 mp3 player 1 mpstat 1 multimedia tools 1 multimodality 1 music 1 music player 1 mysteries 1 n8n security 1 national defense 1 nature conservation 1 net use 1 nethogs 1 network cards 1 network monitoring 1 network resources 1 network security 1 neurobiology 1 neuroenhancement 1 neuroplasticity 1 neuropsychology 1 new life 1 new player 1 new things 1 nftables 1 office 1 onboarding 1 one-time cron 1 onestep4red 1 online 1 online courses 1 online privacy 1 operating system 1 outage 1 package manager 1 paper clips 1 paradox of the fulfilled dream 1 parenting 1 parents 1 parted 1 password 1 password change 1 password policy 1 password recovery 1 password security 1 passwords 1 pdf 1 penetration testing 1 perseverance 1 persistent memory 1 personal data 1 phishing 1 php 1 plagiarism detection 1 plague 1 player 1 poison 1 police 1 predictions 1 privilege escalation 1 processes 1 productivity 1 productivity tools 1 promissory notes 1 protection 1 ps 1 python 1 questions 1 radar 1 raspberry pi 5 1 real-time AI 1 red 1 relax 1 relaxation 1 remote work 1 renewable energy sources 1 reportage 1 rest 1 risk 1 robotaxi 1 root 1 router 1 routing 1 runlevel 1 satellite data 1 satellite internet 1 science 1 scientific research 1 scraping 1 screen 1 screenshot 1 self-hosting 1 series 1 server 1 settings 1 shadow AI 1 show 1 skills 1 skydive 1 sleep 1 small big company 1 smart clothing 1 smartphone 1 smartphones 1 social engineering 1 society 1 software engineering 1 space 1 space technology 1 special forces 1 sport 1 sports 1 spreadsheet 1 sqlite 1 stale data 1 stalking 1 statistics 1 streaming 1 sub-millimeter sensor 1 success 1 symbolic link 1 syngrapha 1 sysctl 1 syslog 1 system acceleration 1 system diagnostics 1 system kernel 1 systemd 1 tablet 1 talk show 1 tcpdump 1 technical documentation 1 technology 2026 1 technology ethics 1 technology future 1 technology regulations 1 television 1 terrorism 1 testing 1 the world in numbers 1 theology and science 1 threats 1 time management 1 time travel 1 timelapse 1 tips 1 traditional photography 1 tutorials 1 two-factor authentication 1 ubuntu 1 udev 1 upbringing 1 updates 1 user interface 1 video conversion 1 violence in the military 1 viral 1 walking 1 walking meetings 1 water retention 1 weather forecasting 1 webmaster 1 wellbeing 1 wind energy 1 wind turbine optimization 1 windows automation 1 wireless network 1 word processing 1 work 1 work automation 1 world 1 world cup 2026 1 world wide web 1 you are a miracle 1 yum 1 zeitgeist 1

Blog archive

Table of contents