Habe unter Ubuntu 12.10 einen LAMP laufen, und bekomm meine Konfiguration mit vhosts, SSL, etc nicht ganz hin.
Folgende Situation:
ich habe eine fixe IP mit weiterleitung der ports 80 und 443 am router auf meine ServerIP
ich habe die domain: www.domain.com (Weiterleitung auf 00.000.00.000 --> meine fixe IP)
beim domain Anbieter habe ich eine subdomain eingerichtet: cloud.domain.com (Weiterleitung auf: 00.000.00.000 ->meine fixe IP)
ich möchte:
1. meine homepage über www.domain.com erreichen, unverschlüsselt also per http://
Verzeichnis zum webinhalt: /var/www/homepage
2. meine cloud (owncloud) über cloud.domain.com und www.cloud.domain.com erreichen. Und zwar per SSL. Später dann auch mit automatischer Weiterleitung von http zu https (ist aber jetzt mal sekundär).
Verzeichnis zur cloud: /var/www/owncloud/
--------------------------------------
in meiner ports.conf habe ich eingefügt:
- Code: Select all
NameVirtualHost *:80
Listen 80
NameVirtualHost *:443
Listen 443
dann gibt es unter /etc/apache2/sites-available/
folgende host dateien (welche aktiviert wurden):
cloud:
- Code: Select all
<VirtualHost *:443>
ServerAdmin webmaster@domain.at
ServerName www.cloud.domain.com
ServerAlias cloud.domain.com
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride all
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</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 ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
die datei: homepage
- Code: Select all
<VirtualHost *:80>
ServerAdmin webmaster@domain.at
ServerName www.domain.com
ServerAlias domain.com
DocumentRoot /var/www/homepage
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/homepage/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</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 ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
und natürlich die default datei:
- Code: Select all
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</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
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>
</VirtualHost>
die cloud erreiche ich momentan nur unter:
00.000.00.000/cloud
sowohl per http als auch https
per cloud.domain.com komme ich nur auf die index.html vom /var/www/
ich weiß, dass im vhost file "cloud" das dokumentroot und directory nicht auf /var/www/cloud/ gesetzt wurde. Habe ich versucht, aber dann kommt bei SSL Verbindung die Meldung "The requested URL /cloud/ was not found on this server
die homepage erreiche ich auch nur unter:
00.000.00.000/homepage
nicht aber per www.domain.com
Muss ich eigentlich in der hosts datei etwas verändern? davon liest man leider gar nichts.
momentan steht bei mir nur
- Code: Select all
127.0.0.1 localhost
127.0.1.1 Computername
müsste da nicht zumindest meine Computer/Server IP rein?
bitte um Hilfe.