Kod: Zaznacz cały
#RedirectMatch ^/$ /apache2-default/
Kod: Zaznacz cały
#RedirectMatch ^/$ /apache2-default/
Kod: Zaznacz cały
/etc/apache2/sites-enabled/000-default
Kod: Zaznacz cały
apache2ctl -S
Kod: Zaznacz cały
apache2ctl -M
Kod: Zaznacz cały
Loaded Modules:
core_module (static)
log_config_module (static)
logio_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
alias_module (shared)
auth_basic_module (shared)
authn_file_module (shared)
authz_default_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
dir_module (shared)
env_module (shared)
info_module (shared)
mime_module (shared)
negotiation_module (shared)
php5_module (shared)
rewrite_module (shared)
setenvif_module (shared)
speling_module (shared)
ssl_module (shared)
status_module (shared)
Syntax OK
Kod: Zaznacz cały
195.162.XX.XX:80 is a NameVirtualHost
default server localhost (/etc/apache2/sites-enabled/000-default:2)
port 80 namevhost localhost (/etc/apache2/sites-enabled/000-default:2)
wildcard NameVirtualHosts and _default_ servers:
*:443 is a NameVirtualHost
default server xxxx.secureip.org (/etc/apache2/sites-enabled/ssl:2)
port 443 namevhost xxxxx.secureip.org (/etc/apache2/sites-enabled/ssl:2)
Syntax OK
Kod: Zaznacz cały
/etc/apache2/sites-enabled/000-default
Kod: Zaznacz cały
vi /etc/apache2/sites-enabled/xxx.conf
Kod: Zaznacz cały
<VirtualHost *:443>
ServerAdmin [email]admin@twojadomena.pl[/email]
DocumentRoot "/home/apache"
ServerName xxxx.twojadomena.pl
SSLEngine on
# SSLLog /var/log/ssl_engine_log
SSLCertificateFile lokalizacja certyfikatu/cert.pem
SSLCertificateKeyFile lokalizacja certyfikatu /key.pem
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
</VirtualHost>
<VirtualHost *:80>
# NameVirtualHost
ServerAdmin [email]admin@twojadomena.pl[/email]
DocumentRoot "/home/apache"
ServerName xxxx.twojadomena.pl
RewriteEngine On
RewriteRule (.*) [url]https://xxxx.twojadomena.pl[/url]
</VirtualHost>
Kod: Zaznacz cały
/etc/init.d/apache2 reload
Kod: Zaznacz cały
<VirtualHost *:80>
ServerName XX.XX.XX.XX
RedirectMatch ^/$ [url]http://twoja-domena/[/url]
</VirtualHost>
Kod: Zaznacz cały
NameVirtualHost 195.162.XX.XX:80
<VirtualHost 195.162.XX.XX:80>
ServerAdmin [email]primislao.steam@gmail.com[/email]
Servername localhost
DocumentRoot /home/apache
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/apache/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
Kod: Zaznacz cały
NameVirtualHost *:443
<VirtualHost *:443>
DocumentRoot /home/apache
ServerName xxxx.secureip.org
ServerAdmin [email]primislao.steam@gmail.com[/email]
SSLEngine on
SSLCACertificateFile /etc/apache2/ssl/caserver.pem
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
<Location /repos>
Require valid-user
SSLRequireSSL
</Location>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
</VirtualHost>
Kod: Zaznacz cały
195.162.XX.XX warezxp localhost
XXXX.secureip.org CNAME 195.162.XX.XX