Author Topic: Apache issue  (Read 7286 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Apache issue
« on: November 27, 2017, 01:04:25 AM »
hello
I have a big problem, i have centos web panel and i cannot start apache

 httpd.service - Web server Apache
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2017-11-27 01:00:10 UTC; 48s ago
 Main PID: 23680 (code=exited, status=0/SUCCESS)

Nov 27 01:00:10 instance-2 systemd[1]: Starting Web server Apache...
Nov 27 01:00:10 instance-2 apachectl[18457]: AH00526: Syntax error on line 8 of /usr/local/apache/conf/sharedip.conf:
Nov 27 01:00:10 instance-2 apachectl[18457]: Invalid command '

this   File: /usr/local/apache/conf/sharedip.conf 

<VirtualHost 10.150.0.2:80>
    ServerName 10.150.0.2
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin my@email.com
    <IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
    </IfModule>
    <Proxy "*">
        <IfModule mod_security2.c>
            SecRuleEngine Off
        </IfModule>
    </Proxy>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^35.194.75.169$
    RewriteCond %{HTTP_HOST} ^webmail.
    RewriteRule ^/(.*) http://127.0.0.1:2095/$1 [P]
</VirtualHost>
<Directory "/">
        AllowOverride All
        Require all granted
</Directory>

ths issue after apache_builder


Offline
***
Re: Apache issue
« Reply #1 on: November 27, 2017, 08:23:55 AM »
You have an error on line 8. The correct way to do what you want is:
Code: [Select]
<Proxy *>
        <IfModule mod_security2.c>
            SecRuleEngine Off
        </IfModule>
    </Proxy>
During the Apache documentation opening and closing quotes don`t have to be there. So, just remove them on the <Proxy> directive and start your apache web server.
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
*
Re: Apache issue
« Reply #2 on: November 27, 2017, 02:57:01 PM »
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@instance-2 shery15699]# systemctl status httpd.service
● httpd.service - Web server Apache
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2017-11-27 14:55:23 UTC; 8s ago
  Process: 1770 ExecStart=/usr/local/apache/bin/apachectl start (code=exited, status=1/FAILURE)

Nov 27 14:55:23 instance-2 systemd[1]: Starting Web server Apache...
Nov 27 14:55:23 instance-2 apachectl[1770]: AH00526: Syntax error on line 8 of /usr/local/apache/conf/sharedip.conf:
Nov 27 14:55:23 instance-2 apachectl[1770]: Invalid command '<Proxy', perhaps misspelled or defined by a module not inclu...ration
Nov 27 14:55:23 instance-2 systemd[1]: httpd.service: control process exited, code=exited status=1
Nov 27 14:55:23 instance-2 systemd[1]: Failed to start Web server Apache.
Nov 27 14:55:23 instance-2 systemd[1]: Unit httpd.service entered failed state.
Nov 27 14:55:23 instance-2 systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.




<VirtualHost 35.194.75.169:80>
    ServerName 35.194.75.169
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin info@centos-webpanel.com
    <IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
    </IfModule>
<Proxy *>
        <IfModule mod_security2.c>
            SecRuleEngine Off
        </IfModule>
    </Proxy>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^35.194.75.169$
    RewriteCond %{HTTP_HOST} ^webmail.
    RewriteRule ^/(.*) http://127.0.0.1:2095/$1 [P]
</VirtualHost>
<Directory "/">
        AllowOverride All
        Require all granted
</Directory>