vhost - über LAN-IP erreichbar?

Alles, was den Apache betrifft, kann hier besprochen werden.

vhost - über LAN-IP erreichbar?

Postby herrmeier » 21. November 2014 12:21

Ich habe zwei "enablete" conf-Dateien:
cat /etc/apache2/sites-enabled/default-ssl.conf | grep -v '#' | grep -v '^$'|less
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName subdomain.dyndns.org:443
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/phpmyadmin/phpmyadmin.crt
SSLCertificateKeyFile /etc/apache2/ssl/phpmyadmin/phpmyadmin.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
</IfModule>


cat /etc/apache2/sites-enabled/subdomain.meinedomain.tld.conf | grep -v '#' | grep -v '^$'|less
Code: Select all
<IfModule mod_ssl.c>
        <VirtualHost *:443>
                ServerName subdomain.dyndns.org:443
                ServerName subdomain.meinedomain.tld:443
                ServerName 192.xxx.xxx.xxx:443
                ServerAlias subdomain.meinedomain.tld subdomain.dyndns.org 192.xxx.xxx.xxx
                ServerAdmin testuser@gmail.com
                Alias /blog /var/www/html/subdomain.meinedomain.tld/blog
                Alias /wiki /var/www/html/subdomain.meinedomain.tld/wiki
                Alias /oc /var/www/html/subdomain.meinedomain.tld/oc
                DocumentRoot /var/www/html/subdomain.meinedomain.tld
                BandwidthModule On
                ForceBandWidthModule On
                Bandwidth all 252400
                ErrorDocument 510 /errors/maxconexceeded.html
                BandWidthError 510
                LargeFileLimit .avi 1 100000
                LargeFileLimit .mpg 1 100000
                CustomLog ${APACHE_LOG_DIR}/access.log combined
                SSLEngine on
                SSLCertificateFile /etc/apache2/ssl/subdomain.meinedomain.tld/apache.crt
                SSLCertificateKeyFile /etc/apache2/ssl/subdomain.meinedomain.tld/apache.key
               
               
                <FilesMatch "\.(cgi|shtml|phtml|php)$">
                                SSLOptions +StdEnvVars
                </FilesMatch>
                <Directory /usr/lib/cgi-bin>
                                SSLOptions +StdEnvVars
                </Directory>
                <Directory /var/www/html/subdomain.meinedomain.tld/blog>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
                </Directory>
               
                <Directory /var/www/html/subdomain.meinedomain.tld/wiki>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
                </Directory>
                <Directory /var/www/html/subdomain.meinedomain.tld/oc>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
               
                Satisfy Any
                </Directory>
                BrowserMatch "MSIE [2-6]" \
                                nokeepalive ssl-unclean-shutdown \
                                downgrade-1.0 force-response-1.0
                BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
        </VirtualHost>
</IfModule>


Alles funktioniert von außen wunderbar. Ich würde allerdings gerne den Verkehr aus dem LAN auch im LAN behalten. Momentan öffnet allerdings auch wenn ich LAN nur die https://192.xxx.xxx.xxx/oc eingebe, die https://subdomain.meinedomain.tld.

Habt Ihr einen Tipp für mich?

Vielen Dank im Voraus!
Apache2 - Version 2.4.7-1ubuntu4
herrmeier
 
Posts: 4
Joined: 11. March 2007 22:29

Re: vhost - über LAN-IP erreichbar?

Postby Nobbie » 21. November 2014 13:14

herrmeier wrote:I
Habt Ihr einen Tipp für mich?


Eine eigenen VirtualHost für Server 192.*.... anlegen. Und pro VirtualHost nur EINEN(!) ServerName angeben. Wenn Du alles zusammenmanschst, brauchst Du gar keine VirtualHosts, das ist ja der Sinn, die Namen zu trennen. Wozu hast Du überhaupt den Über-VirtualHost angelegt?? Wenn Du ihn löschst, kommt es auf dasselbe hinaus.

Den Port im ServerNamen anzugeben ist auch sehr eigenartig, der ist ja schon oben im VirtualHost *:443 festgelegt. Am besten liest Du die Doku ausführlich, dann weißt Du auch, was Du da eigentlich machst.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04


Return to Apache

Who is online

Users browsing this forum: No registered users and 412 guests

cron