Multidomain Installation for CMS and NGINX
-
- Posts: 35
- Joined: Sat Jun 25, 2016 6:56 pm
Multidomain Installation for CMS and NGINX
Hi @
ok I'm testing VestaCP to a test server. My knowledge surrounding NGINX is not so great, therefore a few questions.
I use very much like the CMS Contao. This is also NGINX fit in the new version V4.
It has a folder / web is with the "normal Apache" the host. In VestaCP I have yes or to the folder public_html and public_shtml.
What should I do to avoid the / web in the domain path to have here?
How to proceed if you have x different pages in a multi-domain installation.
Theoretically, it is so that you have only one domain per htdocspfad or?
Hope you understand me;)
greeting
Chris
ok I'm testing VestaCP to a test server. My knowledge surrounding NGINX is not so great, therefore a few questions.
I use very much like the CMS Contao. This is also NGINX fit in the new version V4.
It has a folder / web is with the "normal Apache" the host. In VestaCP I have yes or to the folder public_html and public_shtml.
What should I do to avoid the / web in the domain path to have here?
How to proceed if you have x different pages in a multi-domain installation.
Theoretically, it is so that you have only one domain per htdocspfad or?
Hope you understand me;)
greeting
Chris
Re: Multidomain Installation for CMS and NGINX
I have no previous experience with Contao CMS but your multisite structure is not affected by Vesta.web-seo-consulting wrote:Hi @ ok I'm testing VestaCP to a test server.
After installing Vesta you will have instead of the usual apache /var/www/html -> /home/admin/web. It is the same thing, different path.
There your domain folders will be created and inside your multisite domain you will create your 'subsites'. Of course you will have to adjust the apache conf file otherwise apache won't be able to find the files in your 'subsites'.
Except what I mentioned above, I didn't have to do any other settings for ngnix (I use it as reverse proxy) or anything else.
No worries about public_shtml, is a folder you ain't gonna need.
In a nutshell your structure should be something like:
/home/admin/web/multisite.com/public_html/
and inside the public_html you should install the Contao CMS and inside your contao installation you should add your other sites.
-
- Posts: 35
- Joined: Sat Jun 25, 2016 6:56 pm
Re: Multidomain Installation for CMS and NGINX
Ok I understand it.
I just wanted to do the following.
The data of the CMS Contao I copied public_html in the.
The therein folder / web is the folder that is accessible from the outside.
I have therefore the default.tpl copied renamed or in Contao.tpl and have only the "root docroot%% / web" changed.
Well he should begin the installation of these.
Thus now example.com/web/install.php would be example.com/install.php or?
I just wanted to do the following.
The data of the CMS Contao I copied public_html in the.
The therein folder / web is the folder that is accessible from the outside.
I have therefore the default.tpl copied renamed or in Contao.tpl and have only the "root docroot%% / web" changed.
Well he should begin the installation of these.
Thus now example.com/web/install.php would be example.com/install.php or?
-
- Posts: 35
- Joined: Sat Jun 25, 2016 6:56 pm
Re: Multidomain Installation for CMS and NGINX
Ok soweit habe ich es verstanden.
Ich wollte gerade folgendes machen.
Die Daten des CMS Contao habe ich in das public_html kopiert.
Der darin befindliche Ordner /web ist der Ordner der von außen zugänglich ist. Alle anderen Ordner sollen eigentlich nicht erreichbar sein.
Ich habe also die default.tpl in Contao.tpl umbenannt bzw kopiert und habe nur den "root %docroot%/web" geändert.
Nun sollte er doch die Installation aus diesen beginnen.
Somit müsste example.com/web/install.php nun example.com/install.php sein oder?
Ich wollte gerade folgendes machen.
Die Daten des CMS Contao habe ich in das public_html kopiert.
Der darin befindliche Ordner /web ist der Ordner der von außen zugänglich ist. Alle anderen Ordner sollen eigentlich nicht erreichbar sein.
Ich habe also die default.tpl in Contao.tpl umbenannt bzw kopiert und habe nur den "root %docroot%/web" geändert.
Nun sollte er doch die Installation aus diesen beginnen.
Somit müsste example.com/web/install.php nun example.com/install.php sein oder?
-
- Posts: 35
- Joined: Sat Jun 25, 2016 6:56 pm
Re: Multidomain Installation for CMS and NGINX
Ok habe meine Fehler glaube ich entdeckt.
contao.(s)tpl klein.
Änderungen immer in beiden Dateien.
Das sollte es dann sein, gebe heute Abend bescheid ob es klappt.
Nun nur noch den Shop zum laufen bekommen. Aber das sollte dann auch klappen wenn ich alles in beide tpl eingebe.
Danke
contao.(s)tpl klein.
Änderungen immer in beiden Dateien.
Das sollte es dann sein, gebe heute Abend bescheid ob es klappt.
Nun nur noch den Shop zum laufen bekommen. Aber das sollte dann auch klappen wenn ich alles in beide tpl eingebe.
Danke
-
- Posts: 35
- Joined: Sat Jun 25, 2016 6:56 pm
Re: Multidomain Installation for CMS and NGINX
klappt nicht.
Ich habe die default.tpl und default.stpl kopiert und umbenannt in contao.(s)tpl
Habe nur jeweils root erweitert mit /web
Habe die Templates gewechselt sodas der Server es neu erstellen und einlesen muss.
Wenn ich nun die install.php aufrufen will muss ich dennoch /web in der URL haben. Somit scheint er es nicht umzusetzen das DocumentRoot.
Ich habe die default.tpl und default.stpl kopiert und umbenannt in contao.(s)tpl
Habe nur jeweils root erweitert mit /web
Habe die Templates gewechselt sodas der Server es neu erstellen und einlesen muss.
Wenn ich nun die install.php aufrufen will muss ich dennoch /web in der URL haben. Somit scheint er es nicht umzusetzen das DocumentRoot.
-
- Posts: 35
- Joined: Sat Jun 25, 2016 6:56 pm
Re: Multidomain Installation for CMS and NGINX
Ja das habe ich schon verstanden ;)
Das mit den Wechseln "Template X" speichern dann wieder zurück und Template Contao nehmen habe ich auch gemacht aber er hat das DocumentRoot nicht genommen.
Hier mal die tpl
Das mit den Wechseln "Template X" speichern dann wieder zurück und Template Contao nehmen habe ich auch gemacht aber er hat das DocumentRoot nicht genommen.
Code: Select all
server {
listen %ip%:%web_port%;
server_name %domain_idn% %alias_idn%;
root %docroot%/web;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/%domain%.log combined;
access_log /var/log/nginx/domains/%domain%.bytes bytes;
error_log /var/log/nginx/domains/%domain%.error.log error;
location / {
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
expires max;
}
location ~ [^/]\.php(/|$) {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass %backend_lsnr%;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
}
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
location /error/ {
alias %home%/%user%/web/%domain%/document_errors/;
}
location ~* "/\.(htaccess|htpasswd)$" {
deny all;
return 404;
}
include /etc/nginx/conf.d/phpmyadmin.inc*;
include /etc/nginx/conf.d/phppgadmin.inc*;
include /etc/nginx/conf.d/webmail.inc*;
include %home%/%user%/conf/web/nginx.%domain%.conf*;
}
-
- Posts: 35
- Joined: Sat Jun 25, 2016 6:56 pm
Re: Multidomain Installation for CMS and NGINX
Lockerbleiben ist halt mal wieder eine Lernkurve für mich ich bleib da locker :)
Ich war halt im Verzeichniss /usr/local/vesta/data/templates/web/nginx/php5-fpm
war halt mein Fehler dachte die kommen da rein, nachdem das Template auch angezeigt wurde, dachte ich OK passt.
So teste und melde mich gleich wenn es nicht geht :D
Ich war halt im Verzeichniss /usr/local/vesta/data/templates/web/nginx/php5-fpm
war halt mein Fehler dachte die kommen da rein, nachdem das Template auch angezeigt wurde, dachte ich OK passt.
So teste und melde mich gleich wenn es nicht geht :D
-
- Posts: 35
- Joined: Sat Jun 25, 2016 6:56 pm
Re: Multidomain Installation for CMS and NGINX
Ok ich vielleicht sollten wir erstmal auf einen Wissenstand bringen.
/usr/local/vesta/data/templates/web/http gibt es bei mir nicht.
Habe eine NGINX - PHP-FPM installation also im Grunde "ohne" Apache.
Ich habe einen Ordner /usr/local/vesta/data/templates/web/apache2
Nur wenn ich dort eine default.tpl verändere sehe ich unter Templates diese nicht.
Ich müsste doch wenn ich die NGINX Templates bearbeite dieses "umbiegen" können. Bei Drupal und den anderen CMS Systemen geht es ja auch.
/usr/local/vesta/data/templates/web/http gibt es bei mir nicht.
Habe eine NGINX - PHP-FPM installation also im Grunde "ohne" Apache.
Ich habe einen Ordner /usr/local/vesta/data/templates/web/apache2
Nur wenn ich dort eine default.tpl verändere sehe ich unter Templates diese nicht.
Ich müsste doch wenn ich die NGINX Templates bearbeite dieses "umbiegen" können. Bei Drupal und den anderen CMS Systemen geht es ja auch.
-
- Posts: 35
- Joined: Sat Jun 25, 2016 6:56 pm
Re: Multidomain Installation for CMS and NGINX
Ok danke ich teste selbst noch ein wenig und wenn nicht melde ich mich nochmal.
Danke für die Hilfe bis jetzt
Danke für die Hilfe bis jetzt