Archive for February, 2012

Resolve hostnames within a local network

0

Switching from windows to linux I noticed I couldn’t use the machine names within my local network to access my machines.
Something like “ping server-name” wouldn’t work while “ping 192.168.1.2″ would.
There’s a simple fix for this problem:

[code]sudo apt-get install winbind[/code]
[code]sudo vi /etc/nsswitch.conf[/code]
Add “wins” to the line starting with “hosts:”

Changing the configuration of a VirtualHost generated by Plesk

0

When you use Plesk to manage your websites, the VirtualHost configuration files are generated by Plesk itself.
So if change anything in the configuration file, changes are going to be lost when Plesk re-generates these files.

Instead, you should create a new configuration file vhost.conf in the conf directory of the VirtualHost, usually located at /var/www/vhosts/yourdomain.com/conf.

As an example, say you want to change the open_basedir directive.
<Directory /var/www/vhosts/yourdomain.com/httpdocs/>
php_admin_value open_basedir "/var/www/vhosts/yourdomain.com/httpdocs:/some/shared/dir"
</Directory>

After you have added the file, Plesk needs to be aware of the new file.
To do this, issue the following command:
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=<yourdomain.com>
This will add a line to the Plesk generated configuration file which loads the newly created file.
Changes will take effect immediately, so there’s no need to reload Apache.

Go to Top