Seite 1 von 1

Pfadangaben bei vhost

Verfasst: Di 21. Jun 2011, 14:34
von pixel
Hallo zusammen,

ich habe Contenido auf meinem lokalen Webserver auf den aktuellen Stand (4.8.15) gebracht. Auf meinem loakalen Webserver ist das Dokumentenroot /. Contenido selbst lag auf der Maschiene in /srv/nfsv4/webdevel/trapp. Dementsprechend waren die Pfade in der Datei contenido/includes/config.php

Code: Alles auswählen

$cfg['path']['contenido']               = '/srv/nfsv4/webdevel/trapp/contenido/';
...
Nun wollte ich das CMS auf den Webserver übertragen um dort nochmal alles funktionell zu testen. Auf dem Webserver ist die Konfiguration etwas ander (VHOSTS). Die Konfiguration des vhost sieht nun so aus:

Code: Alles auswählen

# ATTENTION!
# DO NOT MODIFY THIS FILE OR ANY PART OF IT. THIS CAN RESULT IN IMPROPER PLESK
# FUNCTIONING OR FAILURE, CAUSE DAMAGE AND LOSS OF DATA. IF YOU REQUIRE CUSTOM
# MODIFICATIONS TO BE APPLIED TO THE CONFIGURATION, PLEASE, PERFORM THEM IN THE
# FOLLOWING FILE(S):
# /var/www/vhosts/testdomain.de/conf/vhost.conf
# /var/www/vhosts/testdomain.de/conf/vhost_ssl.conf
# /var/www/vhosts/testdomain.de/subdomains/<subdomain-name>/conf/vhost.conf

<IfModule mod_ssl.c>

<VirtualHost 62.75.220.38:443>
	ServerName   testdomain.de:443
	ServerAlias  www.testdomain.de
	UseCanonicalName Off
		SuexecUserGroup         web12_1 psacln
	ServerAdmin  info@trappgmbh.de
	DocumentRoot /var/www/vhosts/testdomain.de/httpsdocs
	CustomLog  /var/www/vhosts/testdomain.de/statistics/logs/access_ssl_log plesklog
	ErrorLog  /var/www/vhosts/testdomain.de/statistics/logs/error_log
<IfModule mod_userdir.c>
	UserDir /var/www/vhosts/testdomain.de/web_users
</IfModule>
	ScriptAlias  /cgi-bin/ /var/www/vhosts/testdomain.de/cgi-bin/
	SSLEngine on
	SSLVerifyClient none
	SSLCertificateFile /opt/psa/var/certificates/certCJo8997
	<Directory /var/www/vhosts/testdomain.de/httpsdocs>
	<IfModule mod_perl.c>
	<Files ~ (\.pl$)>
		SetHandler perl-script
		PerlHandler ModPerl::Registry
		Options ExecCGI
		allow from all
		PerlSendHeader On
	</Files>
	</IfModule>
	<IfModule mod_php4.c>
		php_admin_flag engine on
		php_admin_flag safe_mode on
		php_admin_value open_basedir "/var/www/vhosts/testdomain.de/httpsdocs:/tmp"
	</IfModule>
	<IfModule mod_php5.c>
		php_admin_flag engine on
		php_admin_flag safe_mode on
		php_admin_value open_basedir "/var/www/vhosts/testdomain.de/httpsdocs:/tmp"
	</IfModule>
	<IfModule mod_python.c>
	<Files ~ (\.py$)>
		SetHandler python-program
		PythonHandler	mod_python.cgihandler
	</Files>
	</IfModule>
	<IfModule mod_fcgid.c>
		<Files ~ (\.fcgi)>
			SetHandler fcgid-script
			Options +FollowSymLinks +ExecCGI
		</Files>
	</IfModule>
		SSLRequireSSL
		Options -Includes +ExecCGI
	</Directory>
	<Directory /var/www/vhosts/testdomain.de/web_users>
	<IfModule mod_php4.c>
		php_admin_flag engine off
	</IfModule>
	<IfModule mod_php5.c>
		php_admin_flag engine off
	</IfModule>
	</Directory>
</VirtualHost>

</IfModule>

<VirtualHost 62.75.220.38:80>
	ServerName   testdomain.de:80
	ServerAlias  www.testdomain.de
	UseCanonicalName Off
	SuexecUserGroup         web12_1 psacln
	ServerAdmin  "info@trappgmbh.de"
	DocumentRoot /var/www/vhosts/testdomain.de/httpdocs
	CustomLog  /var/www/vhosts/testdomain.de/statistics/logs/access_log plesklog
	ErrorLog  /var/www/vhosts/testdomain.de/statistics/logs/error_log
<IfModule mod_userdir.c>
	UserDir /var/www/vhosts/testdomain.de/web_users
</IfModule>
	ScriptAlias  /cgi-bin/ /var/www/vhosts/testdomain.de/cgi-bin/
	<IfModule mod_ssl.c>
		SSLEngine off
	</IfModule>
	<Directory /var/www/vhosts/testdomain.de/httpdocs>
	<IfModule mod_perl.c>
	<Files ~ (\.pl$)>
		SetHandler perl-script
		PerlHandler ModPerl::Registry
		Options ExecCGI
		allow from all
		PerlSendHeader On
	</Files>
	</IfModule>
	<IfModule mod_php4.c>
		php_admin_flag engine on
		php_admin_flag safe_mode on
		php_admin_value open_basedir "/var/www/vhosts/testdomain.de/httpdocs:/tmp"
	</IfModule>
	<IfModule mod_php5.c>
		php_admin_flag engine on
		php_admin_flag safe_mode on
		php_admin_value open_basedir "/var/www/vhosts/testdomain.de/httpdocs:/tmp"
	</IfModule>
	<IfModule mod_python.c>
	<Files ~ (\.py$)>
		SetHandler python-program
		PythonHandler	mod_python.cgihandler
	</Files>
	</IfModule>
	<IfModule mod_fcgid.c>
		<Files ~ (\.fcgi)>
			SetHandler fcgid-script
			Options +FollowSymLinks +ExecCGI
		</Files>
	</IfModule>
		Options -Includes +ExecCGI
	</Directory>
	<Directory /var/www/vhosts/testdomain.de/web_users>
	<IfModule mod_php4.c>
		php_admin_flag engine off
	</IfModule>
	<IfModule mod_php5.c>
		php_admin_flag engine off
	</IfModule>
	</Directory>
</VirtualHost>

Wie muss ich die Pfade in der config.php und der Tabelle con_client nun anpassen?

Viele Grüße
pixel

Re: Pfadangaben bei vhost

Verfasst: Di 21. Jun 2011, 15:40
von mfweb
pixel hat geschrieben:Wie muss ich die Pfade in der config.php und der Tabelle con_client nun anpassen?
Führe doch einfach auf dem neuen Server das Setup als "Migration" (auswählbare Setup-Art) aus. Dies sollte alle Pfade entsprechend anpassen, wenn die Zugriffsrechte richtige gesetzt sind.

Und noch was: ich kenne mich zwar nicht so sehr mit Serverkonfiguration aus, aber es ist glaube ich nicht so praktisch, eine Config-Datei mit allen möglichen Angaben (IP, Ports, Pfade, Einstellungen, ...) hier öffentlich zu posten ...

Grüße
Marco

Re: Pfadangaben bei vhost

Verfasst: Mi 22. Jun 2011, 08:29
von pixel
Ok aber das Setup-Verzeichnis habe ich, wie beim Login ins Backend empfohlen, wieder gelöscht. Kann ich dieses aus dem Installationspaket einfach extrahieren und wieder ins Verzeichnis kopieren?

Re: Pfadangaben bei vhost

Verfasst: Mi 22. Jun 2011, 08:56
von Dodger77
Ja, das kannst du einfach hochladen und nach dem Migrations-Setup wieder löschen.

Re: Pfadangaben bei vhost

Verfasst: Mi 22. Jun 2011, 10:31
von pixel
welche Verzeichnisse müssen in der vhost.con bzw, der open_basedir-Direktive übergeben werden damit Contenido Fehlerfrei läuft? Dies wrid beim Migrations-Assistent angemeckert:
[codeopen_basedir-Einstellung könnte unzureichend sein
Setup hat erkannt, daß die PHP-Direktive vermutlich ausreichend konfiguriert ist. Wenn Sie jedoch Meldungen wie 'open_basedir restriction in effect. File is not within the allowed path(s): ' erhalten, müssen Sie die open_basedir-Direktive anpassen.][/code]

Ich denke mal bei den restlichen Warnungen muss ich lediglich die Schreibrechte ändern:

Code: Alles auswählen

Kann contenido/logs/errorlog.txt nicht schreiben
Kann contenido/cronjobs/session_cleanup.php.job nicht schreiben
Kann contenido/cronjobs/send_reminder.php.job nicht schreiben
Kann contenido/cronjobs/optimize_database.php.job nicht schreiben
Kann contenido/cronjobs/move_old_stats.php.job nicht schreiben
Kann contenido/cronjobs/move_articles.php.job nicht schreiben
Kann contenido/cronjobs/linkchecker.php.job nicht schreiben
Kann contenido/cronjobs/run_newsletter_job.php.job nicht schreiben
Kann contenido/cronjobs/setfrontenduserstate.php.job nicht schreiben

Re: Pfadangaben bei vhost

Verfasst: Mi 22. Jun 2011, 15:09
von pixel
Habe die Schreibrechte entsprechend gesetzt. Jetzt funktioniert es soweit. Allerdings wird beim Migrations-Setup das Flag "Startartikel" bei allen enternt und muss anschließend von Hand wieder gesetzt werden.

Re: Pfadangaben bei vhost

Verfasst: Mi 22. Jun 2011, 17:40
von Oldperl
pixel hat geschrieben:Allerdings wird beim Migrations-Setup das Flag "Startartikel" bei allen enternt...
Korrekt, ist ein bekannter Bug im Setup der 4.8.x.

Gruß aus Franken

Ortwin

Re: Pfadangaben bei vhost

Verfasst: Do 23. Jun 2011, 14:59
von Spider IT
Damit hatte ich bis einschließlich 4.8.14 keine Probleme :o

Gruß
René