Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »tausche« (10.04.2008, 15:40)
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
cat /etc/apache2/vhosts.d/00_default_vhosts.conf # Virtual Hosts <IfDefine DEFAULT_VHOST> # see bug #178966 why this is in here # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 Listen 80 # Use name-based virtual hosting. NameVirtualHost *:80 # When virtual hosts are enabled, the main host defined in the default # httpd.conf configuration will go away. We redefine it here so that it is # still available. # # If you disable this vhost by removing -D DEFAULT_VHOST from # /etc/conf.d/apache2, the first defined virtual host elsewhere will be # the default. <VirtualHost *:80> ServerName localhost Include /etc/apache2/vhosts.d/default_vhost.include <IfModule mpm_peruser_module> ServerEnvironment apache apache </IfModule> # Redirect to SSL RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule ^/(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R] # RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L] </VirtualHost> </IfDefine> # vim: ts=4 filetype=apache |
Quellcode |
|
1 |
$ wget http://server.dyndns.org |
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Server ~ # ls -l /etc/apache2/modules.d/ total 64 -rw-r--r-- 1 root root 4030 Feb 21 10:17 00_default_settings.conf -rw-r--r-- 1 root root 2648 Feb 21 10:17 00_error_documents.conf -rw-r--r-- 1 root root 5117 Feb 21 10:17 00_languages.conf -rw-r--r-- 1 root root 2853 Feb 21 10:17 00_mod_autoindex.conf -rw-r--r-- 1 root root 300 Feb 21 10:17 00_mod_info.conf -rw-r--r-- 1 root root 1516 Feb 21 10:17 00_mod_log_config.conf -rw-r--r-- 1 root root 2173 Feb 21 10:17 00_mod_mime.conf -rw-r--r-- 1 root root 535 Feb 21 10:17 00_mod_status.conf -rw-r--r-- 1 root root 1120 Feb 21 10:17 00_mod_userdir.conf -rw-r--r-- 1 root root 2958 Feb 21 10:17 00_mpm.conf -rw-r--r-- 1 root root 203 Feb 21 10:17 10_mod_mem_cache.conf -rw-r--r-- 1 root root 2579 Feb 21 10:17 40_mod_ssl.conf -rw-r--r-- 1 root root 1567 Feb 21 10:17 45_mod_dav.conf -rw-r--r-- 1 root root 666 Feb 21 10:17 46_mod_ldap.conf -rw-r--r-- 1 root root 490 Mar 31 07:58 70_mod_php5.conf |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »tausche« (10.04.2008, 12:38)
Quellcode |
|
1 |
https://Servername |
Quellcode |
|
1 |
https://Servername:Portnummer/ |
Quellcode |
|
1 |
RewriteRule ^/(.*) https://%{SERVER_NAME}:4567%{REQUEST_URI} [R] |
Zitat
1) After "<IfModule mod_ssl.c>" and before "<VirtualHost _default_:443>", add a new line reading "Listen 72"
2) Change "<VirtualHost _default_:443>" to be <VirtualHost _default_:72>
Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »dyle« (10.04.2008, 16:08)