Posts tagged Apache

Setting up development environment

0

Goals:

  • A local DNS server which handles any requests for *.dev
  • An Apache webserver which can translate any *.dev request into a website
  • Enable PHP debugging for local sites
  • Setup a local MTA to send emails from PHP
  • SVN/Subversion server which is accessible through Apache

(more…)

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