PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : vhost fehler


$iMpLy
17.04.2009, 16:56
Hallo Leute, ich habe ein grösseres Problem, das ich irgendwie ned in den griff kriege.. :(

meine 000-default sieht folgendermassen aus:

NameVirtualHost *

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
ServerTokens Prod
ServerSignature Off
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
LogLevel warn

<VirtualHost *>
ServerName http://****.homelinux.com
ServerAlias ****.homelinux.com
DocumentRoot /var/www/****/
</VirtualHost>
also und nun will ich ja den apache neustarten, da ich dies ja geändert habe. sollte ja auch logisch sein, aber dann kommt folgender fehler:

****@server:/etc/apache2# /etc/init.d/apache2 restart
* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Fri Apr 17 17:55:37 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Fri Apr 17 17:55:38 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
[ OK ]
****@server:/etc/apache2#
weiss einer für das Rat?!?


lg SiMpLy

Cerberus
17.04.2009, 17:43
hast du das genau so drin stehen ???

dann ist es komplett falsch

Gandalf
17.04.2009, 18:05
Ich habe es so drin
NameVirtualHost deineip:80
<VirtualHost deine.domain:80>
ServerName deine.domain
ServerAdmin webmaster@localhost

DocumentRoot /var/www/xxx/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/xxx/>
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 /dev/null

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /dev/null 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>

</VirtualHost>

$iMpLy
17.04.2009, 18:14
hast du das genau so drin stehen ???

dann ist es komplett falsch

ähm ja, aufem server isses auch so und dort rennt das tadellos.

Entity
17.04.2009, 18:15
oder so würde es auch gehen


<VirtualHost deineurl.*.cx:80>
DocumentRoot /var/www/tracker/
ServerName deineurl.*
Options -Indexes FollowSymLinks MultiViews
ErrorDocument 403 http://deineurl.*/404.php
</VirtualHost>

$iMpLy
17.04.2009, 18:18
oder so würde es auch gehen


<VirtualHost deineurl.*.cx:80>
DocumentRoot /var/www/tracker/
ServerName deineurl.*.cx
Options -Indexes FollowSymLinks MultiViews
ErrorDocument 403 http://deineurl.*.cx/404.php
</VirtualHost>

ich habe deines nun getestet, geht aber auch nicht:

*****@server:~# /etc/init.d/apache2 restart
* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Fri Apr 17 19:18:06 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Fri Apr 17 19:18:07 2009] [warn] NameVirtualHost *:80 has no VirtualHosts

Entity
17.04.2009, 18:20
hmm sehr komisch

$iMpLy
17.04.2009, 19:25
ja sag ich doch!!
das obere ist bei mir auf dem ROOT und dort rennt das 1a, nur auf dem HomeServer will das nicht so wie ich will..
ich denke nicht, dass das was mit Ubuntu zu tun hat oder?!? :-/



--======================================--
--== Beitrag erstellt: 20:25 ==--
--== automatische Beitragszusammenführung ==--
--======================================--


SiMpLy schrieb nach 1 Stunde, 1 Minute und 42 Sekunden:

Ich habe es so drin
NameVirtualHost deineip:80
<VirtualHost deine.domain:80>
ServerName deine.domain
ServerAdmin webmaster@localhost

DocumentRoot /var/www/xxx/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/xxx/>
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 /dev/null

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /dev/null 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>

</VirtualHost>


und bei deiner vers. kommen noch mehr fehler...

Gandalf
17.04.2009, 21:09
keine ahnung habe es so auf dem server drauf und es läuft ohne Probleme

Cerberus
18.04.2009, 00:02
schonmal hier gekuckt ???
Apache-Dokumentation zu virtuellen Hosts - Apache HTTP Server (http://httpd.apache.org/docs/2.0/de/vhosts/)

$iMpLy
19.04.2009, 12:32
danke cerb, das ist mal gut. :)
damit könnte ich schon eher was anfangen. *hihi*

Sponge
11.01.2011, 14:01
Hallo,

ich häng einfach mal meine Frage hinten ran an das Thema:

Ich habe bei mir die vhosts so eingerichtet das wenn man per url:80 ankommt auf der Seite landet, bzw zum url:443 weitergeleitet wird, wenn man per ip:80 an wählt landet man bei google.

Nun wollte ich genau das selbe für https machen also htps://url:443 = Seite und https//ip:443 = google.
Jedoch wenn ich die vhosts mit Port 80 umschreibe auf Port 443 dann sagt er mir immer das es in Konflikt steht mit den vhost der url:443 regelt.
Muss ich bei https noch etwas beachten oder geht das generell nicht (kann ich mir nicht vorstellen) ?

Grüße


EDIT:Habs hinbekommen, kleiner Denkfehler drinne gewesen ^^