Quantcast
Channel: ISPConfig 3 Archives - FAQforge
Viewing all 35 articles
Browse latest View live

Redirect domains without www (e.g. domain.com) to www.domain.com with apache rewrite rules

$
0
0

If all your visitors shall access your website with a URL like www.domain.com and not without www, use the following apache rewrite rule for redirecting them. RewriteEngine On RewriteCond %{HTTP_HOST} !^www RewriteRule (.*) http://www.%{HTTP_HOST}$1 [L,R] The apache rewrite rule can be added in a .htaccess file in the website root directory or if you use ... Read more

The post Redirect domains without www (e.g. domain.com) to www.domain.com with apache rewrite rules appeared first on FAQforge.


How to enable verbose logging in pure-ftpd on Debian and Ubuntu

$
0
0

To turn on verbose logging (e.g. to debug FTP connection or authentication problems) in pure-ftpd FTP server on Debian and Ubuntu Linux.

Enable debug log in pure-ftpd

Execute the following command as root user in the shell to enable verbose logging:

echo 'yes' > /etc/pure-ftpd/conf/VerboseLog

and then restart pure-ftpd, for init based systems:

service pure-ftpd-mysql restart

For Servers that use systemd:

systemctl restart pure-ftpd-mysql

Enable verbose log pure-ftpd

The debug output will be logged to syslog. To view the log content, execute:

tail -n 100 /var/log/syslog | grep ftp

Debug pure-ftpd issues

And as we can see in the screenshot, debug mode helped us to identify an issue with a missing dhparams file.

Turn off verbose log in pure-ftpd

To disable verbose logging, execute these commands:

rm -f /etc/pure-ftpd/conf/VerboseLog
service pure-ftpd-mysql restart

The post How to enable verbose logging in pure-ftpd on Debian and Ubuntu appeared first on FAQforge.

Configure fail2ban to use route instead of iptables to block connections

$
0
0

Fail2ban uses iptables by default to block incoming connections when they exceed the max.  login retries. The iptables rules used by fail2ban might conflict with other firewall rules, so it might be necessary to reconfigure fail2ban to use the route command for blocking incoming connections.

Fail2ban ban using route command

To reconfigure fail2ban for using the route command instead of iptables, edit or create the route.conf file:

nano /etc/fail2ban/action.d/route.conf

There you insert the following lines:

# Fail2Ban configuration file

[Definition]
actionban = ip route add unreachable <ip>
actionunban = ip route del unreachable <ip>

Then add or change the ban action in the jail.local file in the [DEFAULT] section to "route":

nano /etc/fail2ban/jail.local

And add or edit these lines:

# Fail2Ban configuration file

[DEFAULT]

banaction = route

The post Configure fail2ban to use route instead of iptables to block connections appeared first on FAQforge.

How to speed up logins in pure-ftpd on Debian or Ubuntu Linux by disabling name resolution

$
0
0

If you experience problems with slow logins in pure-ftpd, this is often caused by a problem with the resolving of the client's hostname. This happens e.g. when you run an FTP server in your intranet and the hostname of the client computer does not exist in DNS.

Disable PureFTPD name resolver

To disable name resolving in pureftpd, run the command:

echo 'yes' > /etc/pure-ftpd/conf/DontResolve

and then restart pure-ftpd either with the command:

service pure-ftpd-mysql restart

when you use PureFTPD with MySQL bindings or the command:

service pure-ftpd restart

when using PureFTPS without MySQL.

Disabling name resolving also fixes the following error message:

Apr 12 14:19:10 ispconfig pure-ftpd: (?@?) [ERROR] Sorry, invalid address given

The post How to speed up logins in pure-ftpd on Debian or Ubuntu Linux by disabling name resolution appeared first on FAQforge.

Redirect a subdomain in Apache and keep the URL in the address bar

$
0
0

This tutorial shows you how to use redirect rules in the Apache web server. If you want to redirect a subdomain like sub.domain.tld into a subdirectory of the website and keep the original URL in the browser location bar, you may use the following apache directive.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub.domain.tld [NC]
RewriteRule ^/(.*)$ /sub/$1 [P,L]

This rewrite rule can be added into a .htaccess file in the website root or inside the Apache vhost file. If you use ISPConfig 3, you can add this also into the apache directives field in the website settings.

Replace sub.domain.tld with the subdomain that shall be redirected and /sub/ with the path to the directory were the pages for this subdomain are located.

The post Redirect a subdomain in Apache and keep the URL in the address bar appeared first on FAQforge.

How to add PHP support for jailed SSH users in ISPConfig 3

$
0
0

Jailkit is an easy-to-use tool to create and maintain jail environments for shell users on Linux. In this guide, I will show you how to move PHP and its dependencies into the jail so that the jailed user can execute PHP scripts inside the jail on an ISPConfig server.

Edit the jailkit .ini file and add a section for PHP at the end of the file

Starting with ISPConfig 3.2, there is already a section for PHP in the jailkit .ini file, so you can skip the step to edit jk_init.ini file.

Open the jk_init.ini file with an editor if you are using ISPConfig 3.1 (and not 3.2):

nano /etc/jailkit/jk_init.ini

and paste the following lines at the end of the file:

[php]
comment = the php interpreter and libraries
executables = /usr/bin/php
directories = /usr/lib/php, /usr/share/php, /etc/php, /usr/share/php-geshi, /usr/share/zoneinfo
includesections = env

[env]
comment = environment variables
executables = /usr/bin/env

Then run the command (this command is required in ISPConfig 3.1 and 3.2):

jk_init -c /etc/jailkit/jk_init.ini -f -k -j /var/www/clients/client1/web1 php

To install PHP and its dependencies into the jail.

Add PHP for all newly jailed shell users

To add PHP for all newly jailed shell users that you add in ISPConfig, follow these steps:

  1. Login to ISPConfig and go to System > Server Config
  2. Select the server and go to the jailkit tab.
  3. Add the word "php" separated by a white space at the end of the "Jailkit chroot app sections" field and press save.

ISPConfig PHP Jailkit

The post How to add PHP support for jailed SSH users in ISPConfig 3 appeared first on FAQforge.

How to enable port 587 (submission) in postfix

$
0
0

Some internet access providers have port 25 disabled in their routers to prevent spam. If you run your own email server in a data center, you might have to enable the submission port (587) in postfix to be able to send emails from your local email client to your own mail server.

Enable Submission Port 587 in Postfix

To enable port 587, edit the file /etc/postfix/master.cf

nano /etc/postfix/master.cf

and remove the # in front of the line:

# submission inet n - y - - smtpd

so that it looks like this:

submission inet n - y - - smtpd

and restart postfix:

systemctl restart postfix

The post How to enable port 587 (submission) in postfix appeared first on FAQforge.

How to Disable Error Logging for a Website In ISPConfig 3

$
0
0

To disable the error.log for a website in ISPConfig on an Apache web server, follow these steps:  log in to ISPConfig. Open the website settings of the website where you like to disable the error.log, there you go to the "Options tab" Add the following line in the field labeled "Apache Directives" ErrorLog /dev/null and ... Read more

The post How to Disable Error Logging for a Website In ISPConfig 3 appeared first on FAQforge.


Get a list of all virtual hosts which are defined in all apache configuration files

$
0
0

Have you ever looked in the apache config files to see where a website's virtual host is defined? The apache2ctl script has a useful option that could come in good here. When you execute the command, it should look like this:

apache2ctl -S

You'll obtain a list of all virtual hosts and default servers in the shell, along with the line number where they're declared. Example:

~# apache2ctl -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:8080                 is a NameVirtualHost
default server ispconfig.local (/etc/apache2/sites-enabled/000-ispconfig.vhost:10)
port 8080 namevhost ispconfig.local (/etc/apache2/sites-enabled/000-ispconfig.vhost:10)
*:8081                 is a NameVirtualHost
default server ispconfig.local (/etc/apache2/sites-enabled/000-apps.vhost:10)
port 8081 namevhost ispconfig.local (/etc/apache2/sites-enabled/000-apps.vhost:10)
*:80                   is a NameVirtualHost
default server ispconfig.local (/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost ispconfig.local (/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost example.com (/etc/apache2/sites-enabled/example.com.vhost:7)
Syntax OK

Thanks to Planetfox for this tip.

The post Get a list of all virtual hosts which are defined in all apache configuration files appeared first on FAQforge.

RoundCube error: config.inc.php was not found.

$
0
0

This tutorial shows you how to solve the RoundCube webmail error message: config.inc.php was not found. on an ISPConfig Debian server that uses Nginx as the web server. Solution RoundCube webmail is accessed on an ISPConfig Nginx web server through the apps vhost. The PHP-FPM of the apps vhost is running under the user and group ... Read more

The post RoundCube error: config.inc.php was not found. appeared first on FAQforge.

How to Update ISPConfig 3

$
0
0

The ISPConfig update script is an easy way to update an ISPConfig 3 installation. If you want to make a manual backup of ISPConfig, see the instructions at the end of the article. This tutorial applies to ISPConfig 3.0, ISPConfig 3.1, and also ISPConfig 3.2. To update ISPConfig 3, log in as root user on ... Read more

The post How to Update ISPConfig 3 appeared first on FAQforge.

RoundCube error: config.inc.php was not found.

$
0
0

This tutorial shows you how to solve the RoundCube webmail error message: config.inc.php was not found. on an ISPConfig Debian server that uses Nginx as the web server. Solution RoundCube webmail is accessed on an ISPConfig Nginx web server through the apps vhost. The PHP-FPM of the apps vhost is running under the user and group ... Read more

The post RoundCube error: config.inc.php was not found. appeared first on FAQforge.

Enable SSL for the ISPConfig 3 Controlpanel Login

$
0
0

Hint: The procedure that is described below is for ISPConfig versions < 3.0.3. For newer ispconfig versions, use the builtin ssl certificate creation function of the ispconfig updater instead. The steps below should only be used to manually create a new SSL certificate in case that you can not run the updater on your installation. The ... Read more

The post Enable SSL for the ISPConfig 3 Controlpanel Login appeared first on FAQforge.

How to set PassivePortRange and PassiveIP in pure-ftpd on Debian and Ubuntu Linux

Debugging of ISPConfig 3 server actions in case of a failure

$
0
0

The following article describes the steps that need to be taken to debug ISPConfig 3 server scripts. This procedure applies to all ISPConfig 3 versions incl. ISPConfig 3.1 and ISPConfig 3.2. Enable the debug Loglevel in ISPConfig Login to the ISPConfig interface and set the log level to Debug under System > System > Server ... Read more

The post Debugging of ISPConfig 3 server actions in case of a failure appeared first on FAQforge.


Viewing all 35 articles
Browse latest View live