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

Cannot change apache web template

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
24 posts
  • 1
  • 2
  • 3
  • Next
webass
Posts: 86
Joined: Sat Nov 15, 2014 1:16 am
Contact:
Contact webass
Skype

Os: Ubuntu 15x
Web: nginx + php-fpm
Cannot change apache web template
  • Quote

Post by webass » Wed Aug 17, 2016 8:03 pm

Hi,
curious thing happened. I got a useless web templte for apache2. And I deleted the web template manually. While it was active on one domain.
Now I cannot change the web template no where anymore, it gives this error:

Code: Select all

Error: can't parse config /home/admin/conf/web/apache2.conf
then it happened, that it deleted the conf completely.
and all domains got redirected to the domain running under a second user ...

Then I had to install the complete thing in virtualbox to get my apache2.conf back.
Still the one domain makes thi sproblems, which uses the webtemplate I want to change.

Totally not getting why it doesnt write into it also anymore.
Sorry. Its hard to explain.
It doesnt work over the panel and also not over the CLI.
When I do it on a subdomain for example, I get:

Code: Select all

Error: apache2 restart failed
with this errors message in shell:
* Restarting web server apache2 [fail]
* The apache2 configtest failed.
Output of config test was:
apache2: Syntax error on line 83 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/conf.d/vesta.conf: Syntax error on line 336 of /home/admin/conf/web/apache2.conf: </VirtualHost> without matching <VirtualHost> section
Action 'configtest' failed.
The Apache error log may have more information.
Then I have to go into:

Code: Select all

/home/admin/conf/web/apache2.conf
and there to clean some stuff out like this:
</VirtualHost>
which is anywhere in between the virtual hosts.
and apache restarts fine again.

But this doesnt work on the one domain which uses the "broken" web template I want it to stop to use
Very strange stuff.

Now, I wanted to delete the sub domain I changed the webtemplate on for testing, and it gives this:

Code: Select all

Error: can't parse config /home/admin/conf/web/nginx.conf
New shit happening.
But I can restart nginx over the shell without a problem.
Did I break anythign in the panel?
Andre
Top

webass
Posts: 86
Joined: Sat Nov 15, 2014 1:16 am
Contact:
Contact webass
Skype

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Cannot change apache web template
  • Quote

Post by webass » Thu Aug 18, 2016 7:19 am

LOL
I'll try to follow the steps first, then maybe dig into the depth of this invisibility.
Top

webass
Posts: 86
Joined: Sat Nov 15, 2014 1:16 am
Contact:
Contact webass
Skype

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Cannot change apache web template
  • Quote

Post by webass » Thu Aug 18, 2016 7:27 am

Sorry, this is vestacps answer:

Code: Select all

Error: can't parse config /home/admin/conf/web/apache2.conf
I changed the template to be so:

Code: Select all


<VirtualHost %ip%:%web_port%>

    ServerName %domain_idn%
    %alias_string%
    ServerAdmin %email%
    DocumentRoot %docroot%
    ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
    Alias /vstats/ %home%/%user%/web/%domain%/stats/
    Alias /error/ %home%/%user%/web/%domain%/document_errors/
    SuexecUserGroup %user% %group%
    CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
    CustomLog /var/log/%web_system%/domains/%domain%.log combined
    ErrorLog /var/log/%web_system%/domains/%domain%.error.log
    <Directory %docroot%>
        AllowOverride All
        Options +Includes -Indexes +ExecCGI
        <Files *.php>
          SetHandler fcgid-script
        </Files>
        FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
    </Directory>
    <Directory %home%/%user%/web/%domain%/stats>
        AllowOverride All
    </Directory>
    IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*

</VirtualHost>
and on default.tpl:

Code: Select all


<VirtualHost %ip%:%web_port%>

    ServerName %domain_idn%
    %alias_string%
    ServerAdmin %email%
    DocumentRoot %docroot%
    ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
    Alias /vstats/ %home%/%user%/web/%domain%/stats/
    Alias /error/ %home%/%user%/web/%domain%/document_errors/
    #SuexecUserGroup %user% %group%
    CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
    CustomLog /var/log/%web_system%/domains/%domain%.log combined
    ErrorLog /var/log/%web_system%/domains/%domain%.error.log
    <Directory %docroot%>
        AllowOverride All
        Options +Includes -Indexes +ExecCGI
    </Directory>
    <Directory %home%/%user%/web/%domain%/stats>
        AllowOverride All
    </Directory>

    <IfModule mod_ruid2.c>
        RMode config
        RUidGid %user% %group%
        RGroups www-data
    </IfModule>
    <IfModule itk.c>
        AssignUserID %user% %group%
    </IfModule>

    IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*

</VirtualHost>
One line free on top and also on /home/admin/conf/web/apache2.conf I did so.
and nothing helped.

I want to have the site use the default-tpl instead the other one, where I just wanted the fcgid to become with 256 MB memory limit. Thas why I created it long ago.
Top

webass
Posts: 86
Joined: Sat Nov 15, 2014 1:16 am
Contact:
Contact webass
Skype

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Cannot change apache web template
  • Quote

Post by webass » Thu Aug 18, 2016 7:56 am

Well, not sure what you mean.

I did a rebuild web on admin the other day, that messed my whole server up.
I think you dont mean to make this again.

I go to panel or either do it on CLI when using another template.
Then it makes these errors.
In apache2.conf nothing happens other than the </VirtualHost> is ADDED anywhere.
The domain I want to change doesnt even HAVE a virtual host entry in apache2.conf.
When I add it manually it only is taken "by half"...

LOL, now you know, when I go to the domain and save it WITH the template it anyway uses, then it saves without error, but in apache2.conf still no entry created for this domain. Thats why its not reachable at all over web.

And now, I tested it on another domain to set from default-tpl to fcgid-tpl.
result: It cannot restart apache2

Error:

Code: Select all

 * Restarting web server apache2                                                                                                                              [fail] 
 * The apache2 configtest failed.
Output of config test was:
apache2: Syntax error on line 83 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/conf.d/vesta.conf: Syntax error on line 372 of /home/admin/conf/web/apache2.conf: </VirtualHost> without matching <VirtualHost> section
Action 'configtest' failed.
The Apache error log may have more information.
error log doesnt show any special:

Code: Select all

[Thu Aug 18 09:22:48.231722 2016] [core:notice] [pid 2932] AH00094: Command line: '/usr/sbin/apache2'
[Thu Aug 18 09:59:07.597504 2016] [mpm_prefork:notice] [pid 2932] AH00169: caught SIGTERM, shutting down
Thsi is how it looks where I have to delete the "lost" line:

Code: Select all

    IncludeOptional /home/admin/conf/web/apache2.sub.my-domain.de.conf*

</VirtualHost>

</VirtualHost>

<VirtualHost 1.2.3.4:8080>
Top

webass
Posts: 86
Joined: Sat Nov 15, 2014 1:16 am
Contact:
Contact webass
Skype

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Cannot change apache web template
  • Quote

Post by webass » Thu Aug 18, 2016 8:10 am

Now I added the vhost manually in shell.

It seems to stay there in place on top of all others, when restart apache and nginx.

Now, I guess, when I make a change at the template again it will not work
Top

webass
Posts: 86
Joined: Sat Nov 15, 2014 1:16 am
Contact:
Contact webass
Skype

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Cannot change apache web template
  • Quote

Post by webass » Thu Aug 18, 2016 9:26 am

I was about doing something similar.
Just deleting the domain after backup and re-issue only the domain.

The problem I was feared of, is that the domain with the website on wordpress behind it also is the name of the host...
But maybe this doesnt play a role at all.

So, same steps as you said, but not on a new user, just in same user, only reinstalling the whole domain and stuff.

Will this work?
Top

webass
Posts: 86
Joined: Sat Nov 15, 2014 1:16 am
Contact:
Contact webass
Skype

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Cannot change apache web template
  • Quote

Post by webass » Fri Aug 19, 2016 7:58 am

XoXiLhJ0mn wrote:Hi,

Why dont you first clean the final http config files and place proper config manually in there? Thats how you sidetrack all bugs, wherever they are, waiting to convert you in a Walking Dead Admin.
I did create an apache.conf over a virtualbox. Through adding all domains of this user and then pasting the conf from the Vbox over to the server.
XoXiLhJ0mn wrote: In a similar situation, I simply deleted the domain and mail boxes. Thereafter, I did a rebuild. Then, I created a new user. In the new users account, I created the domain once again.
With this technique, a new linux user with a different UserID is created. Thereafter, everything's gets mapped differently, fresh, and the mess does not occur anymore.
XoXiLhJ0mn wrote: BTW, you could try with one empty line before, i.e. the first line, and one empty line at the end of the template.
ok
Yes, everything else gets wrapped up too. Like user rights, wordpress can only install over FTP or when I change chmod of /uploads to 777.
A mess.
Top

webass
Posts: 86
Joined: Sat Nov 15, 2014 1:16 am
Contact:
Contact webass
Skype

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Cannot change apache web template
  • Quote

Post by webass » Fri Aug 19, 2016 8:00 am

XoXiLhJ0mn wrote:Hi,

Why dont you first clean the final http config files and place proper config manually in there? Thats how you sidetrack all bugs, wherever they are, waiting to convert you in a Walking Dead Admin.
I did create an apache.conf over a virtualbox. Through adding all domains of this user and then pasting the conf from the Vbox over to the server.
XoXiLhJ0mn wrote: In a similar situation, I simply deleted the domain and mail boxes. Thereafter, I did a rebuild. Then, I created a new user. In the new users account, I created the domain once again.
With this technique, a new linux user with a different UserID is created. Thereafter, everything's gets mapped differently, fresh, and the mess does not occur anymore.
How can I move the domains over to the user perfectly?
XoXiLhJ0mn wrote:BTW, you could try with one empty line before, i.e. the first line, and one empty line at the end of the template.
Will try, ok

Yes, everything else gets wrapped up too. Like user rights, wordpress can only install over FTP or when I change chmod of /uploads to 777.
A mess.
Top

webass
Posts: 86
Joined: Sat Nov 15, 2014 1:16 am
Contact:
Contact webass
Skype

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Cannot change apache web template
  • Quote

Post by webass » Fri Aug 19, 2016 10:38 am

It's just unbelievable and demotivating.

I have 2,5 Terrabyte at least anywhere and making a full backup over the server will take around 20 hrs.

But maybe I can move the big files over to another user, make a backup of the old admin user, create a new one and start from there, right?
Top

webass
Posts: 86
Joined: Sat Nov 15, 2014 1:16 am
Contact:
Contact webass
Skype

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Cannot change apache web template
  • Quote

Post by webass » Fri Aug 19, 2016 10:51 am

Ok, because I used Vestacp always the way to not change the admin. I saved the data in webfolders to set the FTP users for access up easily. But this brings other problems.
I believe I have to think my whole approach over.

I will try your suggestions.
Thanks a lot.
Will keep you updated.
Andre
Top


Post Reply
  • Print view

24 posts
  • 1
  • 2
  • 3
  • 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
 

 

Login  •  Register

I forgot my password