Forum Moderators: phranque

Message Too Old, No Replies

Question: +FollowSymLinks and websrvmng

where are these used and required

         

DyeA

9:57 pm on May 7, 2008 (gmt 0)

10+ Year Member



Hello again,

I had two questions that I had hope someone could shed some light on.

1. Options +FollowSymLinks is not necessary in your conf file to enable RewriteCond and RewriteRule and RedirectMatch to be acted upon is it? From what I have read I am thinking only RewriteEngine on is necessary? Or are the requirements different according to what file we are working in? (htaccess versus vhost.conf for example)

2. In the knowledgebase articles of my host I see the occasional reference to

/usr/local/psa/admin/sbin/websrvmng -a -v

as a way to restart the server and reconfigure a vhost... This host uses Plesk. Is websrvmng a Plesk only file? What do the flags -a -v mean? I have executed this command from the shell and nothing has happened. I get no response - no stopping notification and no starting notificiaton.

Any help would be appreciated!

Thanks,
Ward

jdMorgan

10:08 pm on May 7, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



From the mod_rewrite documentation:

Note: To enable the rewriting engine for per-directory configuration files you need to set ``RewriteEngine On'' in these files and ``Options FollowSymLinks'' must be enabled. If your administrator has disabled override of FollowSymLinks for a user's directory, then you cannot use the rewriting engine. This restriction is needed for security reasons.

So +FollowSymLinks is required in order to use mod_rewrite directives in .htaccess files.

I don't know the details of Plesk, but some of the results of this search [google.com] for "websrvmng" may be of use.

Jim

DyeA

10:35 pm on May 7, 2008 (gmt 0)

10+ Year Member



Thanks Jim! Answers my question about FollowSymLinks

From that search I found this excerpt in an article about creating a wildcard subdomain (I starred the appropriate part)

-------------

Step-by-step configuration

Create a subdomain z-WILDCARD in Plesk - of course in the admin section of the right domain.
Why do we need this name? 'cause this entry should be the last entry in the list of subdomains, otherwise this "trick" will not work. So if you have a domain as e.g. zabalula , than you should maybe name the subdomain zzzz-WILDCARD or similar.

Add special configuration (catchall for all subdomains) to the vhosts.conf file of this subdomain.
Normally it's located in /srv/www/vhosts/domain.com/subdomains/z-WILDCARD/conf/vhosts.conf. You have to create it - normally you need the root user to do this. Copy the following content into the file:
ServerAlias *.domain.com

***Apply the new configuration - recreate the Apache configuration. You have to run the tool websrvmng which is a Plesk tool that manages and creates the webserver configuration. Execute the following as root user.***

/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com

Finally - restart Apache to load the new configuration, also as root.

apache2ctl restart

---------------

According to these directions you still need to restart even though you have "applied the new configuration" - perhaps running the command cues the server to reconfigure that vhost when it is restarted

Thanks again Jim

Ward