Apache 2
Nastavení Apache 2 na localhostu.
K aplikaci změn je třeba restartovat apache:
$ sudo systemctl restart apache2
Aktivace modulů
$ a2enmod userdir
$ a2enmod info
$ a2enmod status
$ a2enmod info
$ a2enmod status
Nastavení userdir
Toto nastevení používá fast-php, viz PHP.
mod_userdir.conf:
<IfModule mod_userdir.c>
UserDir disabled root
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit Indexes Options
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec ExecCGI
<FilesMatch "\.ph(p[345]?|tml)$">
SetHandler None
</FilesMatch>
AddType application/fast-php .php
Action application/fast-php /cgi-bin/php-fast
<Limit GET POST OPTIONS PROPFIND>
<IfModule !mod_access_compat.c>
Require all granted
</IfModule>
<IfModule mod_access_compat.c>
Order allow,deny
Allow from all
</IfModule>
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
<IfModule !mod_access_compat.c>
Require all denied
</IfModule>
<IfModule mod_access_compat.c>
Order deny,allow
Deny from all
</IfModule>
</IfModule>
</LimitExcept>
</Directory>
</IfModule>
UserDir disabled root
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit Indexes Options
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec ExecCGI
<FilesMatch "\.ph(p[345]?|tml)$">
SetHandler None
</FilesMatch>
AddType application/fast-php .php
Action application/fast-php /cgi-bin/php-fast
<Limit GET POST OPTIONS PROPFIND>
<IfModule !mod_access_compat.c>
Require all granted
</IfModule>
<IfModule mod_access_compat.c>
Order allow,deny
Allow from all
</IfModule>
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
<IfModule !mod_access_compat.c>
Require all denied
</IfModule>
<IfModule mod_access_compat.c>
Order deny,allow
Deny from all
</IfModule>
</IfModule>
</LimitExcept>
</Directory>
</IfModule>
Nastavení SSH
Testováno v OpenSuSE 15.1
$ sudo a2enmod ssh
$ sudo a2enflag SSL
$ sudo openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/apache2ssl.key/server.key -out /etc/apache2/ssl.crt/server.crt
# nastaveni ssh config souboru, i.e. Listen 443
$ sudo systemctl restart apache2
$ sudo a2enflag SSL
$ sudo openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/apache2ssl.key/server.key -out /etc/apache2/ssl.crt/server.crt
# nastaveni ssh config souboru, i.e. Listen 443
$ sudo systemctl restart apache2