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 […]
Category: Apache
Apache Proxy Timeout with PHP-FPM
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 […]
Mod_UserDir
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 […]
rsyslog not working
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|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) […]
How to install mod_cloudflare
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 […]
Enabling Brotli compression on Apache
The mod_brotli module provides the BROTLI_COMPRESS output filter that allows output from your server to be compressed using the brotli compression format before being sent to the client over the network. This module uses the Brotli library found at https://github.com/google/brotli. Follow the installation procedure steps to install mod_brotli :- Install Brotli on your server yum […]
Options FollowSymLinks not allowed
In the latest version of cwp we don't allow any more to use "Options FollowSymLinks" in the .htaccess files as this is a security issue. Why Options FollowSymLinks is not secure? This is a big security issue when you have multiple accounts or domains on the same server, an attacker can hack one domain and […]
WebServers vhost templates
WebServers vhost templates * Currently available only for centos 7, version 0.9.8.741+ Important: Don't edit existing template files as this will be overwritten on the next cwp update. Templates location: /usr/local/cwpsrv/htdocs/resources/conf/web_servers/ - Folder main contains main configuration for WebServers - Folder vhosts contains vhosts configuration for domains (this is what you need) How to create […]
How to install Apache Solr
How to install Apache Solr on CWP servers Install all required packages: yum install java lsof mysql-connector-java Check for latest version here: http://ftp.carnet.hr/misc/apache/lucene/solr/ Download and Install Solr: wget http://ftp.carnet.hr/misc/apache/lucene/solr/6.6.1/solr-6.6.1.tgz tar xzf solr-6.6.1.tgz solr-6.6.1/bin/install_solr_service.sh --strip-components=2 ./install_solr_service.sh solr-6.6.1.tgz Check if the service was properly installed: service solr status Available commands: service solr {start|stop|restart|status} Web GUI: http://IP:8983/solr/
How to enable mod_suexec with Apache
How to enable mod_suexec with Apache on CentOS WebPanel This module allows CGI scripts to run as a specified user and group. Don't enable this module if you don't need it as it will add additional execution time for your scripts. This module is recommend for servers having enabled cgi-script and which run multiple sites. […]
How to run cgi scripts with Apache
How to run cgi scripts with Apache In this example we will add support for the following file extensions: .cgi .pl .py We have set folder to be /home/*/public_html/cgi-bin/ as this is by default, don't set it to as public_html only as this will cause issues with your php scripts. Create File: /usr/local/apache/conf.d/mod_cgid.conf LoadModule cgid_module […]
How to install mod_pagespeed
How to install Apache mod_pagespeed module on CentOS WebPanel? mod_pagespeed is an open-source Apache module created by Google to help Make the Web Faster by rewriting web pages to reduce latency and bandwidth. Installer for 64bit Systems mkdir /usr/local/src/mod_pagespeed cd /usr/local/src/mod_pagespeed wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm rpm2cpio mod-pagespeed-stable_current_x86_64.rpm | cpio -idmv cp /usr/local/src/mod_pagespeed/usr/lib64/httpd/modules/mod_pagespeed.so /usr/local/apache/modules/ cp /usr/local/src/mod_pagespeed/usr/lib64/httpd/modules/mod_pagespeed_ap24.so /usr/local/apache/modules/ wget […]
How to install mod_limits
How to install Apache mod_limits module on CentOS WebPanel? This apache module is aimed at protecting the web server during attacks. It provides a few, very usefull, functionalities: * Limit the maximum number of simultaneous connections * Limit the maximum number of simultaneous connections per Vhost * Limit the maximum number of spawned processes with […]
PHP opcache-xcache-apc-varnish
Which cache is working with cwp apache using suPHP? Nginx as revers proxy will also help as it will be used for all static file and will provide better stability and lower number of request for apache. PHP-Switcher and PHP-Selector are using suPHP handler PHP-FPM Selector will work with any cache Varnish will work with […]
Apache run python script
Install python and run python scripts with apache on your CentOS WebPanel server. Install python yum install python Check python version python -V Create a test script cd /home/USERNAME/public_html mkdir cgi-bin nano cgi-bin/test.py Now add the following python test script in the file: /home/USERNAME/public_html/cgi-bin/test.py #!/usr/bin/python # enable debugging import cgitb cgitb.enable() print "Content-Type: text/plain\r\n\r\n" print […]
Enable Apache modules
Since CWP is using a custom compiled apache from source, you can easily enable additional apache module in CWP by going to Apache Settings --> Apache Re-Build To rebuild apache, select apache & suPHP version For additional module activation you only need to add a new line in the text box, like for example: --enable-expires […]
Rebuild Apache vHosts
Instructions for Apache vHosts (Virtual Host configuration files) rebuild. go to Left Menu --> Apache Settings --> Rebuild Apache vHosts click on the "Rebuild All Apache vHosts" If you have Varnish Cache Server or Nginx Reverse Proxy installed this option will also rebuild configuration for them. Apache Logs are in: /usr/local/apache/logs/
How to install Varnish
How to install Varnish on the CentOS Web Panel servers In CWP.admin left menu go to: -> WebServer Settings -> Select WebServers after you save & rebuild the configuration varnish will be installed. Varnish gets activated per domain and that means you will need to manually activate it for each domain. How to activate Varnish […]
How to change default website
Instructions on how to change default website which is visible when access the server by the hostname or IP address. To edit default index file: Go to Folder /usr/local/apache/htdocs/ and edit index.html file Apache Logs are in: /usr/local/apache/logs/
Default Page Displayed for all domains
If you get a default web page displayed for all domains then please follow these instructions. 1. Logout and Login again as root (CWP automatically tries to fix known issues on the root login) 2. Set shared IP address (Left Menu --> CWP Settings --> Edit Settings) 3. Rebuild Apache vHosts (Left Menu --> Apache […]