Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Multidomain Installation for CMS and NGINX

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
13 posts
  • 1
  • 2
  • Next
web-seo-consulting
Posts: 35
Joined: Sat Jun 25, 2016 6:56 pm

Multidomain Installation for CMS and NGINX
  • Quote

Post by web-seo-consulting » Sun Jun 26, 2016 8:09 pm

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
Top

vlahonick
Posts: 50
Joined: Sat Mar 21, 2015 10:08 am

Re: Multidomain Installation for CMS and NGINX
  • Quote

Post by vlahonick » Sun Jun 26, 2016 9:34 pm

web-seo-consulting wrote:Hi @ ok I'm testing VestaCP to a test server.
I have no previous experience with Contao CMS but your multisite structure is not affected by Vesta.

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.
Top

web-seo-consulting
Posts: 35
Joined: Sat Jun 25, 2016 6:56 pm

Re: Multidomain Installation for CMS and NGINX
  • Quote

Post by web-seo-consulting » Mon Jun 27, 2016 9:16 am

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?
Top

web-seo-consulting
Posts: 35
Joined: Sat Jun 25, 2016 6:56 pm

Re: Multidomain Installation for CMS and NGINX
  • Quote

Post by web-seo-consulting » Mon Jun 27, 2016 10:39 am

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?
Top

web-seo-consulting
Posts: 35
Joined: Sat Jun 25, 2016 6:56 pm

Re: Multidomain Installation for CMS and NGINX
  • Quote

Post by web-seo-consulting » Mon Jun 27, 2016 12:23 pm

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
Top

web-seo-consulting
Posts: 35
Joined: Sat Jun 25, 2016 6:56 pm

Re: Multidomain Installation for CMS and NGINX
  • Quote

Post by web-seo-consulting » Mon Jun 27, 2016 1:06 pm

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.
Top

web-seo-consulting
Posts: 35
Joined: Sat Jun 25, 2016 6:56 pm

Re: Multidomain Installation for CMS and NGINX
  • Quote

Post by web-seo-consulting » Mon Jun 27, 2016 1:45 pm

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.

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*;
}

Hier mal die tpl
Top

web-seo-consulting
Posts: 35
Joined: Sat Jun 25, 2016 6:56 pm

Re: Multidomain Installation for CMS and NGINX
  • Quote

Post by web-seo-consulting » Mon Jun 27, 2016 3:17 pm

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
Top

web-seo-consulting
Posts: 35
Joined: Sat Jun 25, 2016 6:56 pm

Re: Multidomain Installation for CMS and NGINX
  • Quote

Post by web-seo-consulting » Mon Jun 27, 2016 4:12 pm

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.
Top

web-seo-consulting
Posts: 35
Joined: Sat Jun 25, 2016 6:56 pm

Re: Multidomain Installation for CMS and NGINX
  • Quote

Post by web-seo-consulting » Mon Jun 27, 2016 4:27 pm

Ok danke ich teste selbst noch ein wenig und wenn nicht melde ich mich nochmal.

Danke für die Hilfe bis jetzt
Top


Post Reply
  • Print view

13 posts
  • 1
  • 2
  • Next

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

cron

Login  •  Register

I forgot my password