<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Control WebPanel Wiki &#187; Apache</title>
	<atom:link href="http://wiki.centos-webpanel.com/category/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://wiki.centos-webpanel.com</link>
	<description>CentOS WebPanel Wiki</description>
	<lastBuildDate>Wed, 12 Feb 2025 20:38:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>No space left on device: AH00023: Couldn&#039;t create the proxy mutex</title>
		<link>http://wiki.centos-webpanel.com/no-space-left-on-device-ah00023-couldnt-create-the-proxy-mutex</link>
		<comments>http://wiki.centos-webpanel.com/no-space-left-on-device-ah00023-couldnt-create-the-proxy-mutex#comments</comments>
		<pubDate>Sat, 20 Jan 2024 21:36:05 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1852</guid>
		<description><![CDATA[Example error messages in apache log file /usr/local/apache/logs/error_log [core:emerg] [pid 2013449:tid 140639997298560] (28)No space left on device: AH00023: Couldn't create the proxy mutex [proxy:crit] [pid 2013449:tid 140639997298560] (28)No space left on device: AH02478: failed to create proxy mutex In most cases this error message will not allow you to start apache, solution is to restart [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Example error messages in apache log file <strong>/usr/local/apache/logs/error_log</strong></p>
<p>[core:emerg] [pid 2013449:tid 140639997298560] (28)No space left on device: AH00023: Couldn't create the proxy mutex<br />
[proxy:crit] [pid 2013449:tid 140639997298560] (28)No space left on device: AH02478: failed to create proxy mutex</p>
<p>In most cases this error message will not allow you to start apache, solution is to restart the server or use the command bellow.</p>
<p><strong>Solution:</strong></p>
<pre>ipcs -s | awk -v user=nobody '$3==user {system("ipcrm -s "$2)}'</pre>
]]></content:encoded>
			<wfw:commentRss>http://wiki.centos-webpanel.com/no-space-left-on-device-ah00023-couldnt-create-the-proxy-mutex/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create a wildcard subdomain with NGINX and Apache</title>
		<link>http://wiki.centos-webpanel.com/how-to-create-a-wildcard-subdomain-with-nginx-and-apache</link>
		<comments>http://wiki.centos-webpanel.com/how-to-create-a-wildcard-subdomain-with-nginx-and-apache#comments</comments>
		<pubDate>Fri, 16 Dec 2022 21:49:43 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[wildcard subdomain]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1833</guid>
		<description><![CDATA[In this tutorial, you'll learn how you can create wildcard subdomains in CWP NGINX and Apache easily via the predefined template. First Ensure and check that you've wildcard DNS added to your current DNS hosting provider or in CWP DNS if you're using your own nameservers : example DNS entry:- *.domain.tld. 14400 IN A 192.168.1.100 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In this tutorial, you'll learn how you can create wildcard subdomains in CWP NGINX and Apache easily via the predefined template.</p>
<h3>First</h3>
<p>Ensure and check that you've wildcard DNS added to your current DNS hosting provider or in CWP DNS if you're using your own nameservers :</p>
<p>example DNS entry:-</p>
<pre>*.domain.tld. 14400 IN A 192.168.1.100
</pre>
<h3>Second</h3>
<p>Go to <strong>CWP-admin dashboard &gt;&gt; Webserver Settings &gt;&gt; Webservers Domain Settings</strong></p>
<p>there you need to choose the user and then the domain name where you need to set the wildcard subdomain support.</p>
<h3>Third</h3>
<p>Click on the button "<strong>Create configuration</strong>" which is located next to the domain name for which you need to enable the wildcard subdomain</p>
<h3>Fourth</h3>
<p>Choose "<strong>Nginx + Php-fpm</strong>" or "<strong>apache + php-fpm</strong>" or "<strong>nginx + apache + php-fpm</strong>" or "<strong>nginx + apache + php-cgi</strong>" according to your choice of engines.</p>
<blockquote><p>If you've chosen "<strong>nginx + php-fpm</strong>" select the "<strong>wildcard</strong>" template under "<strong>Nginx default vhost template</strong>" and save the changes by click on rebuild vhost option.</p>
<p>If "<strong>apache + php-fpm</strong>" is chosen select "<strong>wildcard</strong>" template under "<strong>Apache default vhost template</strong>" and save the changes by click on rebuild vhost option.</p>
<p>If "<strong>nginx + apache + php-fpm</strong>" or "<strong>nginx + apache + php-cgi</strong>" is chosen select the "<strong>wildcard</strong>" template under "<strong>Nginx default vhost template</strong>" also select "<strong>wildcard</strong>" template under "<strong>Apache default vhost template</strong>" and save the changes by click on rebuild vhost option.</p></blockquote>
<p>That's it you've easily enabled wildcard subdomain support for your domain</p>
<p>**SAME CAN BE DONE FOR SUB-DOMAIN</p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.centos-webpanel.com/how-to-create-a-wildcard-subdomain-with-nginx-and-apache/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebServer Errors</title>
		<link>http://wiki.centos-webpanel.com/webserver-errors</link>
		<comments>http://wiki.centos-webpanel.com/webserver-errors#comments</comments>
		<pubDate>Tue, 25 Jan 2022 20:50:41 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[WebServer Errors]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1702</guid>
		<description><![CDATA[The page isn’t redirecting properly - you probably have HTTPS redirect forced in .htaccess if you are using nginx then do a redirect via nginx https template 403 Forbidden - Mod Security (most common): click here for instructions - Incorrect include file location - Other apache rules or permissions For more details please check apache [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>The page isn’t redirecting properly</strong><br />
- you probably have HTTPS redirect forced in .htaccess if you are using nginx then do a redirect via nginx https template</p>
<p><strong>403 Forbidden</strong><br />
- Mod Security (most common): <a href="/mod_security-for-cwp" title="Mod Security info" target="_blank">click here for instructions</a><br />
- Incorrect include file location<br />
- Other apache rules or permissions<br />
For more details please check <a href="/service-log-paths" title="Apache Logs" target="_blank">apache logs</a>.</p>
<p><strong>500 Internal Server Error</strong><br />
Issue related to the server configuration, examples, and most common issues:<br />
- Domain has custom PHP version configured using .htaccess and that PHP version isn't installed<br />
- Domain has defined <strong>Options</strong> in .htaccess file, you need to remove line starting with Options<br />
- PHP/PHP-FPM version is not working well with the site code, try another version.<br />
- Error: "<em>End of script output before headers</em>" this can be related to file permissions, try using fix account permissions</p>
<p><strong>502 Bad Gateway</strong><br />
- PHP-FPM is down, try to restart PHP-FPM service<br />
- It can be also related to the small number of php-fpm processes, this can be changed from WebServers_conf by using "PHP-FPM default template" default process limit is 4.<br />
if some have issue increase to 20 or more depending on the requirements<br />
- It can be also related to apache having all processes used if you use nginx, in this case, if the server is not overloaded apache number of the process will need to be increased.</p>
<p><strong>503 Service Unavailable</strong><br />
- This is probably related to incorrect port redirection or php-fpm socket if not working<br />
- php-fpm is down<br />
- php-fpm specific version not installed (example missing php-fpm56 and domain is set to use it)<br />
Error_Log:  FCGI: attempt to connect to Unix domain socket /opt/alt/php-fpm56/usr/var/sockets/wwwener.sock (*) failed</p>
<p>Rebuild webservers and tail log: /var/log/cwp/webservers.log<br />
2018-12-20 01:12:57 <USERNAME> PHP-FPM php-fpm72: ERROR failed at quota or security limits<br />
TEST</p>
<pre>
# su USERNAME -c "touch /home/USERNAME/.quota-check" -s /bin/bash
su: cannot create child process: Resource temporarily unavailable
su: cannot open session: System error</pre>
<p>then this is probably related to users security limits you need to increase it and don't use 0 as this is the lowest limit.</p>
<p>if we have this output</p>
<pre>touch: cannot touch '/home/USERNAME/.quota-check': Permission denied</pre>
<p>then this means users home folder has incorrect permissions /home/USERNAME/</p>
<p>it can be also related to session restrictions in the pam file<br />
/etc/pam.d/su [know platforms having this issue: lxckvm]<br />
change "session include system-auth" to "session optional system-auth"</p>
<p><strong>503 Backend fetch failed</strong><br />
- This is probably related to incorrect backend configuration for varnish</p>
<p>https://stackoverflow.com/questions/34548690/how-to-increase-timeout-between-varnish-4-and-nginx</p>
<p><strong>504 GATEWAY TIMEOUT</strong><br />
- probably related to apache or php-fpm not responding, try restarting apache or php-fpm version you are using</p>
<p>For Apache issue: If the issue repeats then try to increase apache limits<br />
For PHP-FPM: If the issue repeats then try to increase the process limit as described above<br />
...more info to be added here</p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.centos-webpanel.com/webserver-errors/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improve website performance</title>
		<link>http://wiki.centos-webpanel.com/improve-website-performance</link>
		<comments>http://wiki.centos-webpanel.com/improve-website-performance#comments</comments>
		<pubDate>Fri, 31 Dec 2021 17:56:17 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Wordpress cache]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1655</guid>
		<description><![CDATA[In this guide you can learn how you can increase performance and security of your website follow this simple tasks to get more out of your server. First we always recommend to go with CWP pro as its comes with many premium features like php-fpm which can drastically increase your website's performance and security. PHP [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In this guide you can learn how you can increase performance and security of your website follow this simple tasks to get more out of your server.</p>
<p>First we always recommend to go with CWP pro as its comes with many premium features like php-fpm which can drastically increase your website's performance and security.</p>
<h3>PHP :</h3>
<p>In php-fpm we've varieties of cache extension added like :</p>
<ul>
<li>Opcache</li>
<li>APCu</li>
<li>Redis Object Cache</li>
<li>Memcached Object cache</li>
</ul>
<p>this extensions can boost your website even by 30%-70%</p>
<p>we'll learn more about it in below Points :</p>
<p><strong>Opcache :</strong></p>
<p>OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request. i.e. in simple language it can be explained that opcache will help to lower the cpu load by caching some of the already executed php code which drastically lower the cpu load and increase website performance. This is by default enabled with CWP PHP-FPM</p>
<p><strong>APCu :<br />
</strong></p>
<p>This is something like php opcache but with more aggressive caching which will help your website to cope with high traffic situations, since it is recommended to use with caution and with supported plugins/modules.</p>
<p><strong>Redis Object cache :</strong></p>
<p>Redis is a persistent object cache backend cache server, this will mainly boost the DB and other website related calls and queries by cache them in to RAM memory (RAM is the fastest memory till date even faster than NVMe and UFS), so take the advantage of redis cache.</p>
<p>to use redis you need to check your website CMS is supporting it or not some CMS have inbuilt support and some needs external plugin to get it enabled like for WORDPRESS you need to use some "Redis Object Cache" or "W3 Total Cache" plugin to get it enabled.</p>
<p>when this is equipped with php inbuilt OPCACHE you can see significant performance improvement.</p>
<p><strong>Memcached Object Cache :</strong><br />
This is also in memory (RAM) object cache but only focused on alleviating database load and good for dynamic websites i.e. it only caches the DB related queries and we didn't recommend to use this with any other cache like redis or APCu. You can use it with php opcache.</p>
<p>to use memcache  please check your Script documentation upon how you can do it, <strong>For wordpress you can follow this tutorial :</strong></p>
<p>1. Install php <strong>memcache</strong> (not memcached) from CWP php modules</p>
<p>2. Copy object-cache.php to wp-content - download from here : https://raw.githubusercontent.com/Automattic/wp-memcached/master/object-cache.php</p>
<p>3. Add the `WP_CACHE_KEY_SALT` constant to the `wp-config.php`:</p>
<pre>define( 'WP_CACHE_KEY_SALT', '...long random string...' );
</pre>
<p>This helps prevent cache pollution when multiple WordPress installs are using the same Memcached server. The value must be unique for each WordPress install.</p>
<p>Testing memcache from the command line</p>
<pre>watch -td '(echo stats ; echo quit) | nc 127.0.0.1 11211 | grep get*'</pre>
<p>You can clean the cache by restarting memcached</p>
<pre>service memcached restart</pre>
<h3><strong>Webserver :</strong></h3>
<p>Also you can use<strong> nginx + php-fpm</strong> as we have some commonly used script template available which will make your site even faster with nginx which is famous for its security and performance benefit.  Although nginx can be only used when you're using with your personal website for hosting environment we always recommend <strong>Apache</strong> as the main webserver you can still use <strong>nginx + Apache</strong> for performance benefits.</p>
<p>When using <strong>nginx + php-fpm</strong> the upper cache frameworks will work too universally with apache and nginx</p>
<p><strong>Varnish</strong> web cache : Varnish is useful when you've static website, varnish will drastically improve performance from web-server side by caching resources in RAM but it is not idol if you're using dynamic websites/blogs/eCommerce.</p>
<p>You can use Varnish cache with your WordPress blog in CWP as we've created template for WP,  you just need to select varnish wordpress template from webserver domain config and you're ready to rock with varnish.</p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.centos-webpanel.com/improve-website-performance/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install xsendfile with CWP Apache</title>
		<link>http://wiki.centos-webpanel.com/install-xsendfile-with-cwp-apache</link>
		<comments>http://wiki.centos-webpanel.com/install-xsendfile-with-cwp-apache#comments</comments>
		<pubDate>Fri, 12 Nov 2021 10:41:03 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[xsendfile]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1595</guid>
		<description><![CDATA[mod_xsendfile is a small Apache2 module that processes X-SENDFILE headers registered by the original output handler. If it encounters the presence of such header it will discard all output and send the file specified by that header instead of using Apache internals including all optimizations like caching-headers and sendfile or mmap if configured. It is [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>mod_xsendfile</strong> is a small Apache2 module that processes <strong>X-SENDFILE</strong> headers registered by the original output handler. If it encounters the presence of such header it will discard all output and send the file specified by that header instead of using Apache internals including all optimizations like caching-headers and sendfile or mmap if configured. It is useful for processing script-output of e.g. php, perl or any cgi.</p>
<p><strong>To install xsendfile module you need to follow this steps :</strong></p>
<p>Install dependencies needed for building the module :</p>
<pre>yum install libtool git apr apr-devel apr-util apr-util-devel -y
</pre>
<p>Compiling/Installing xsendfile with CWP-Apache</p>
<pre>cd /usr/local/src
rm -rf mod_xsendfile
git clone https://github.com/nmaier/mod_xsendfile.git
cd mod_xsendfile
/usr/local/apache/bin/apxs -a -i -c mod_xsendfile.c
</pre>
<p>Usage :<br />
for enabling xsendfile for all php use this in .htaccess :</p>
<pre>&lt;IfModule mod_xsendfile.c&gt;
  &lt;Files *.php&gt;
    XSendFile On
    XSendFileAllowAbove On
    SetEnv MOD_X_SENDFILE_ENABLED 1
  &lt;/Files&gt;
&lt;/IfModule&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://wiki.centos-webpanel.com/install-xsendfile-with-cwp-apache/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable WebDAV Per User Basis</title>
		<link>http://wiki.centos-webpanel.com/enable-webdav-per-user-basis</link>
		<comments>http://wiki.centos-webpanel.com/enable-webdav-per-user-basis#comments</comments>
		<pubDate>Tue, 16 Feb 2021 23:06:51 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[WebDAV]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1546</guid>
		<description><![CDATA[WebDAV is for remote file Upload, manipulation, and editing Usage. WebDAV stands for Web Distributed Authoring and Versioning, which is an extension of HTTP that lets clients edit/view remote content on the web. This tutorial will guide you on how you can enable WebDAV for your user accounts. Hardness :Medium Requirements (main) : php 7.1 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>WebDAV is for remote file Upload, manipulation, and editing Usage. WebDAV stands for Web Distributed Authoring and Versioning, which is an extension of HTTP that lets clients edit/view remote content on the web.</p>
<p>This tutorial will guide you on how you can enable WebDAV for your user accounts.</p>
<p><strong>Hardness :</strong>Medium<br />
<strong>Requirements (main) :</strong> php 7.1 and above and Apache webserver</p>
<h3><strong>Step 1 :</strong></h3>
<p>Download and install composer</p>
<pre>curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
chmod 755 /usr/local/bin/composer
</pre>
<h3><strong>Step 2 :</strong></h3>
<p>Install SabreDAV- WebDav php based</p>
<pre>su -l username -s /bin/bash
cd /home/username/public_html
git clone https://github.com/sabre-io/dav.git
cd dav
/opt/alt/php-fpm71/usr/bin/php /usr/local/bin/composer install
or
"use your own php 7.1 bin path" /usr/local/bin/composer install
mkdir data
</pre>
<p>**replace "username" with you User account name.</p>
<p>you can use PHP switcher or PHP selector or php-fpm</p>
<p>Now create an index.php file in dav directory</p>
<pre>nano index.php
</pre>
<p>and add this script in it and save:</p>
<p><script src="https://pastebin.com/embed_js/JXgDRPMz?theme=dark"></script><br />
you can edit it like below to change the desired directory :</p>
<pre>$rootDirectory = new DAV\FS\Directory('/home/username/public_html');
</pre>
<p>Fix the permission :</p>
<pre>chmod 755 /home/username/public_html/dav
chmod 644 /home/username/public_html/dav/index.php
</pre>
<h3>Step 3 :</h3>
<p>As <strong>root</strong> user now you need to enable the Apache WebDAV modules and it sub required modules :</p>
<pre>mod_alias, 
mod_auth_digest, 
mod_authn_core, 
mod_authn_file,
mod_authz_core, 
mod_authz_user, 
mod_dav, 
mod_dav_fs,
mod_setenvif
</pre>
<p>got to <strong>/usr/local/apache/conf/httpd.conf </strong>and uncomment (remove the # from the first line of each required module) and uncomment (remove the # ) <strong>Include "conf/extra/httpd-dav.conf"</strong> file in <strong>httpd.conf</strong></p>
<p>Next you also need to add the Directory directive to the domain/subdomain vhost which you want to activate webdav :</p>
<p>for ssl vhost :</p>
<pre>   &lt;Directory "/home/username/public_html/dav"&gt;
		AllowOverride All
		SSLRequireSSL
		Require all granted
   &lt;/Directory&gt;
</pre>
<p>for non ssl vhost :</p>
<pre>	&lt;Directory "/home/username/public_html/dav"&gt;
		AllowOverride All
		Require all granted
	&lt;/Directory&gt;</pre>
<p>*** ensure you added this in main domain vhost i.e. usually under first one and in tag : &lt;VirtualHost 1.1.1.1:443&gt; &lt;/VirtualHost&gt;</p>
<p>after changes restart httpd server :</p>
<pre>systemctl restart httpd</pre>
<h3><strong>Step 4 :</strong></h3>
<p>Adding authentication to webdav access</p>
<p>In user DAV domain dir <strong>/home/username/public_html/dav</strong> create <strong>.htaccess</strong> add this rules for <strong>digest auth</strong> and <strong>rewrite rule</strong> :</p>
<pre>RewriteRule (.*) index.php [L]
AuthType Digest
AuthName "dav"
AuthDigestDomain /
AuthUserFile /home/username/.htpasswd
Require user username-dav
Satisfy All
</pre>
<p>**replace username with user account username<br />
***replace username-dav with the dav user name you created with htdigest command below</p>
<p>And create .htpasswd in <strong>/home/username</strong> and add the digest auth, you need to use htdigest :</p>
<pre>htdigest -c /home/username/.htpasswd dav admin
</pre>
<p>**replace username with user account username</p>
<p>enter the password when prompted.</p>
<blockquote><p>eg :<br />
admin:dav:595a268370390fe3e20cfffdd583d610</p>
<p>here :-<br />
username-dav : admin<br />
realm : dav<br />
pass : 595a268370390fe3e20cfffdd583d610</p></blockquote>
<h3><strong>Step 5 :</strong></h3>
<p>Accessing webdav via domain</p>
<p>go to <strong>https://www.yourdomain.tld/dav</strong> or <strong>http://www.yourdomain.tld/dav</strong></p>
<p>or you can use command line or <strong>webdav client</strong> in this eg I'm using <strong>cadaver</strong> package cli :</p>
<pre>cadaver https://www.yourdomain.tld/dav</pre>
]]></content:encoded>
			<wfw:commentRss>http://wiki.centos-webpanel.com/enable-webdav-per-user-basis/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Proxy Timeout with PHP-FPM</title>
		<link>http://wiki.centos-webpanel.com/apache-proxy-timeout-with-php-fpm</link>
		<comments>http://wiki.centos-webpanel.com/apache-proxy-timeout-with-php-fpm#comments</comments>
		<pubDate>Wed, 28 Oct 2020 20:31:34 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[proxy timeout]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1500</guid>
		<description><![CDATA[Apache has a default timeout of 60 seconds, you can increase it by creating a custom template in cwp. Follow this basic steps to increase the php timeout when using php-fpm : Copy the default templates and save/create it as timeout tpl and stpl: cd /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/httpd/php-fpm/ cp default.stpl timeout.stpl cp default.tpl timeout.tpl Now you need [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Apache has a default timeout of 60 seconds, you can increase it by creating a custom template in cwp.<br />
Follow this basic steps to increase the php timeout when using php-fpm :</p>
<p><strong>Copy the default templates and save/create it as timeout tpl and stpl:</strong></p>
<pre>cd /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/httpd/php-fpm/
cp default.stpl timeout.stpl
cp default.tpl timeout.tpl</pre>
<p>Now you need to edit the both templates "<strong>timeout.tpl</strong>" and "<strong>timeout.stpl</strong>" and add this line: </p>
<pre>ProxyTimeout 90</pre>
<p> under
<pre>&lt;IfModule proxy_fcgi_module&gt;</pre>
<p> and save it.</p>
<p>** ProxyTimeout 90 is the limit that allows the script to run for 90 seconds before it gets hit with the timeout threshold.<br />
Increase it according to your needs, please don't use too high numbers to avoid server overloads.</p>
<p>eg :</p>
<pre>&lt;IfModule proxy_fcgi_module&gt;
    ProxyTimeout 90
    &lt;FilesMatch \.php$&gt;
        SetHandler "proxy:%backend_fcgi%|fcgi://localhost"
    &lt;/FilesMatch&gt;
&lt;/IfModule&gt;</pre>
<p>Now all you need is to create a custom configuration under webserver domain config and select the template or choose this template as a default in the webserver main config.</p>
<p>More info about the custom templates can be found <a href="/webservers-vhost-templates" title="Webserver custom templates" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.centos-webpanel.com/apache-proxy-timeout-with-php-fpm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mod_UserDir</title>
		<link>http://wiki.centos-webpanel.com/mod_userdir</link>
		<comments>http://wiki.centos-webpanel.com/mod_userdir#comments</comments>
		<pubDate>Thu, 27 Feb 2020 12:21:38 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1327</guid>
		<description><![CDATA[APACHE If you are using apache only webserver then you can access mod_userdir like this: http://HOSTNAME.COM/~USERNAME/ example: http://srv1.google.com/~yahoo/ NGINX When using nginx you can use mod_userdir only with apache port. http://HOSTNAME.COM:8181/~USERNAME/ example: http://srv1.google.com:8181/~yahoo/ Replace - HOSTNAME.COM with your server hostname or main IP - USERNAME with the username of the user Port 8181 is an [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>APACHE<br />
</strong>If you are using apache only webserver then you can access mod_userdir like this:</p>
<p>http://HOSTNAME.COM/~USERNAME/</p>
<p>example:</p>
<p>http://srv1.google.com/~yahoo/</p>
<p><strong>NGINX</strong><br />
When using nginx you can use mod_userdir only with apache port.</p>
<p>http://HOSTNAME.COM:8181/~USERNAME/</p>
<p>example:</p>
<p>http://srv1.google.com:8181/~yahoo/</p>
<p><strong>Replace</strong><br />
- HOSTNAME.COM with your server hostname or main IP<br />
- USERNAME with the username of the user</p>
<p>Port 8181 is an apache port when using nginx.<br />
You will need to open a firewall for port 8181 if you want to allow that access.</p>
<p><strong>INFO</strong><br />
Note that mod_userdir always opens only the main account path:<br />
/home/username/public_html</p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.centos-webpanel.com/mod_userdir/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rsyslog not working</title>
		<link>http://wiki.centos-webpanel.com/rsyslog-not-working</link>
		<comments>http://wiki.centos-webpanel.com/rsyslog-not-working#comments</comments>
		<pubDate>Mon, 02 Sep 2019 22:06:13 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1275</guid>
		<description><![CDATA[If you have an issue that your logs are not working on the centos 7 then check what rsyslog version you have. Know to have issues rsyslog-8.24.0-34.el7.x86_64 How to check rpm -qa&#124;grep sysl rsyslog-8.24.0-34.el7.x86_64 service rsyslog status Redirecting to /bin/systemctl status rsyslog.service ● rsyslog.service - System Logging Service Loaded: loaded (/usr/lib/systemd/system/rsyslog.service; enabled; vendor preset: enabled) [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you have an issue that your logs are not working on the centos 7 then check what rsyslog version you have.</p>
<p><strong>Know to have issues</strong><br />
rsyslog-8.24.0-34.el7.x86_64</p>
<p><strong>How to check</strong></p>
<pre>rpm -qa|grep sysl

rsyslog-8.24.0-34.el7.x86_64</pre>
<pre>service rsyslog status

Redirecting to /bin/systemctl status rsyslog.service
● rsyslog.service - System Logging Service
   Loaded: loaded (/usr/lib/systemd/system/rsyslog.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-09-02 17:20:12 EEST; 7h ago
     Docs: man:rsyslogd(8)

http://www.rsyslog.com/doc/

 Main PID: 4619 (rsyslogd)
   CGroup: /system.slice/rsyslog.service
           └─4619 /usr/sbin/rsyslogd -n

Sep 02 12:25:44 my.server.com rsyslogd[20369]: imjournal: journal reloaded... [v8.24.0-34.el7 try http://www.rsyslog.com/e/0 ]
Sep 02 16:16:54 my.server.com rsyslogd[20369]: sd_journal_get_cursor() failed: 'Cannot assign requested address'  [v8.24.0-34.el7]
Sep 02 16:17:19 my.server.com rsyslogd[20369]: imjournal: journal reloaded... [v8.24.0-34.el7 try http://www.rsyslog.com/e/0 ]
Sep 02 16:17:19 my.server.com rsyslogd[20369]: sd_journal_get_cursor() failed: 'Cannot assign requested address'  [v8.24.0-34.el7]
Sep 02 16:17:19 my.server.com rsyslogd[20369]: imjournal: journal reloaded... [v8.24.0-34.el7 try http://www.rsyslog.com/e/0 ]
Sep 02 16:37:16 my.server.com rsyslogd[20369]:  [origin software="rsyslogd" swVersion="8.24.0-34.el7" x-pid="20369" x-info="http://www.rsyslog.com"] exiting on signal 15.
</pre>
<p><strong>Solution</strong><br />
remove rsyslog and install syslog-ng</p>
<pre>yum remove rsyslog
yum install syslog-ng
</pre>
]]></content:encoded>
			<wfw:commentRss>http://wiki.centos-webpanel.com/rsyslog-not-working/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install mod_cloudflare</title>
		<link>http://wiki.centos-webpanel.com/how-to-install-mod_cloudflare</link>
		<comments>http://wiki.centos-webpanel.com/how-to-install-mod_cloudflare#comments</comments>
		<pubDate>Mon, 27 May 2019 13:28:32 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[mod_cloudflare]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1156</guid>
		<description><![CDATA[Based on mod_remoteip.c, this Apache extension will replace the remote_ip variable in the user's logs with the correct remote IP sent from Cloudflare. The module only performs the IP substitution for requests originating from Cloudflare IPs by default. In addition to this, the extension will also set the HTTPS environment variable to "on" in cases [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Based on mod_remoteip.c, this Apache extension will replace the remote_ip variable in the user's logs with the correct remote IP sent from Cloudflare. The module only performs the IP substitution for requests originating from Cloudflare IPs by default.</p>
<p>In addition to this, the extension will also set the HTTPS environment variable to "on" in cases where Flexible SSL is in use. This prevents software such as WordPress from being broken by Flexible SSL.</p>
<p><strong>Install mod-cloudflare:</strong></p>
<pre>yum install libtool git apr apr-devel apr-util apr-util-devel -y
cd /usr/local/src
git clone https://github.com/cloudflare/mod_cloudflare.git
cd mod_cloudflare
/usr/local/apache/bin/apxs -a -i -c mod_cloudflare.c</pre>
<p>Restart httpd service and confirm that <strong>mod_cloudflare</strong> has been installed:</p>
<pre>service httpd restart &amp;&amp; /usr/local/apache/bin/httpd -M|grep cloudflare
</pre>
<p><strong>More Security :</strong></p>
<p>if you need your site is only available via cloudflare IPs, you need to simply add the following to your Apache/httpd configuration file and all non-Cloudflare traffic will be forbidden with status code 403:</p>
<pre>DenyAllButCloudFlare</pre>
<p>Clouflare ip ranges can be found here :<br />
ipv4 ranges :<a href="https://www.cloudflare.com/ips-v4" target="_blank" rel="noopener"> https://www.cloudflare.com/ips-v4</a><br />
ipv6 ranges : <a href="https://www.cloudflare.com/ips-v6" target="_blank" rel="noopener">https://www.cloudflare.com/ips-v6</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.centos-webpanel.com/how-to-install-mod_cloudflare/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
