Greyscout

Member
Feb 19, 2015
8
0
1
cPanel Access Level
Root Administrator
This looks like a simple fix to me but I'm a few hours into it and getting no where. I'm a little new to this, so please bare with me. It looks to me as if it needs a <limit> directive but it fails every time I try to add anything...any help would be much appreciated.

Initial configuration generation failed with the following message:

Code:
Configuration problem detected on line 82 of file /usr/local/apache/conf/httpd.conf.work.Vb7iYOORLG5M7B1G: <Limit> directive requires additional arguments

--- /usr/local/apache/conf/httpd.conf.work.Vb7iYOORLG5M7B1G ---
76</Directory>
77
78<Directory "/usr/local/apache/htdocs">
79 Options All
80 AllowOverride None
81 Require all granted
82 ===> <Limit > <===
83 </Limit>
84
85</Directory>
86
87<Files >
88 Order
--- /usr/local/apache/conf/httpd.conf.work.Vb7iYOORLG5M7B1G ---


Rebuilding configuration without any local modifications.

Built /usr/local/apache/conf/httpd.conf OK
 

Greyscout

Member
Feb 19, 2015
8
0
1
cPanel Access Level
Root Administrator
I get two errors....

Code:
Distilled successfully
!! Failed to generate a syntactically correct Apache configuration (/usr/local/apache/conf/httpd.conf) from local template, retrying with default template: Configuration problem detected on line 4 of file /usr/local/apache/conf/includes/remoteip.conf:    RemoteIP: Error parsing IP RemoteIPInternalProxy (Name or service not known error) for RemoteIPInternalProxy
--- /usr/local/apache/conf/includes/remoteip.conf --- 1LoadModule remoteip_module modules/mod_remoteip.so 2#Mod_remoteip settings 3RemoteIPHeader X-Real-IP 4 ===> RemoteIPInternalProxy 127.0.0.1 RemoteIPInternalProxy 23.252.120.154 <=== 5RemoteIPInternalProxy 23.252.120.254 --- /usr/local/apache/conf/includes/remoteip.conf --- !!

!! Failed to utilize existing Apache configuration file. Resetting Apache configuration to default. !!
Updating Apache configuration
Updating Apache configuration
[/usr/local/cpanel/scripts/set_mailman_archive_perms] Setting I/O priority to reduce system load: best-effort: prio 6
[/usr/local/cpanel/scripts/set_mailman_archive_perms] Setting mailman archive permissions
[/usr/local/cpanel/scripts/set_mailman_archive_perms] Continuing in the background
Distilled successfully
!! Failed to generate a syntactically correct Apache configuration (/usr/local/apache/conf/httpd.conf) from local template, retrying with default template: Configuration problem detected on line 56 of file /usr/local/apache/conf/httpd.conf.1430684167:    RewriteEngine must be On or Off
--- /usr/local/apache/conf/httpd.conf.1430684167 --- 50ScriptAliasMatch ^/?securewhm/?$ /usr/local/cpanel/cgi-sys/swhmredirect.cgi 51ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/wredirect.cgi 52ScriptAliasMatch ^/?whm/?$ /usr/local/cpanel/cgi-sys/whmredirect.cgi 53ScriptAliasMatch ^/Autodiscover/Autodiscover.xml /usr/local/cpanel/cgi-sys/autodiscover.cgi 54ScriptAliasMatch ^/autodiscover/autodiscover.xml /usr/local/cpanel/cgi-sys/autodiscover.cgi 55 56 ===> RewriteEngine <=== 57 58Alias /bandwidth /usr/local/bandmin/htdocs/ 59Alias /img-sys /usr/local/cpanel/img-sys/ 60Alias /java-sys /usr/local/cpanel/java-sys/ 61Alias /mailman/archives /usr/local/cpanel/3rdparty/mailman/archives/public/ 62Alias /pipermail /usr/local/cpanel/3rdparty/mailman/archives/public/ --- /usr/local/apache/conf/httpd.conf.1430684167 --- !!
 

Infopro

Well-Known Member
May 20, 2003
17,090
516
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
It appears you've already been customizing things if I was to guess.

Code:
!! Failed to generate a syntactically correct Apache configuration (/usr/local/apache/conf/httpd.conf) from local template, retrying with default template: Configuration problem detected on line 4 of file /usr/local/apache/conf/includes/remoteip.conf:  RemoteIP: Error parsing IP RemoteIPInternalProxy (Name or service not known error) for RemoteIPInternalProxy
--- /usr/local/apache/conf/includes/remoteip.conf --- 1LoadModule remoteip_module modules/mod_remoteip.so 2#Mod_remoteip settings 3RemoteIPHeader X-Real-IP 4 ===> RemoteIPInternalProxy 127.0.0.1 RemoteIPInternalProxy 23.252.120.154 <=== 5RemoteIPInternalProxy 23.252.120.254 --- /usr/local/apache/conf/includes/remoteip.conf --- !!
nginx maybe?

Remove the changes you've made and rebuild Apache with the default profile to get you going again.
 

Greyscout

Member
Feb 19, 2015
8
0
1
cPanel Access Level
Root Administrator
I removed nginxadmin and can't remember any changes I've made. I only noticed it wouldn't recompile after looking in Apache Config because a pci audit was saying File ETag wasn't "none" and I knew it was set to none. Here's the error after uninstalling nginx admin, fwiw...
Code:
!! Failed to generate a syntactically correct Apache configuration (/usr/local/apache/conf/httpd.conf) from local template, retrying with default template: Configuration problem detected on line 82 of file /usr/local/apache/conf/httpd.conf.1430692635:    directive requires additional arguments
--- /usr/local/apache/conf/httpd.conf.1430692635 --- 76 77 78 79 Options All 80 AllowOverride None 81 Require all granted 82 ===> <=== 83 84 85 86 87 88 Order --- /usr/local/apache/conf/httpd.conf.1430692635 --- !!
 

Greyscout

Member
Feb 19, 2015
8
0
1
cPanel Access Level
Root Administrator
I put a ticket in and they removed the custom templates and it rebuilt without issue. Not sure what I did to cause it to not work but thank you again for the excellent support. Not the first time you guys rescued me. : )
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello,

I am happy to see the issue was resolved after removing the custom templates that were leftover from your Nginx configuration. Thank you for updating us with the outcome.