Enabel PHP for a System Folder

Discussion in 'Installation/Configuration' started by pillul, Jan 26, 2007.

  1. pillul

    pillul New Member

    HY Guys short Question,

    where or how can i enable php for a folder which is not a "web" ?

    for example i would like to place a php script in /usr/local/nagios ;)


  2. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    Look for the Apache ScriptAlias directive. It will do what you want.
  3. pillul

    pillul New Member

    ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

    <Directory "/usr/local/nagios/sbin">
    Options ExecCGI
    AllowOverride AuthConfig
    Order allow,deny
    Allow from all

    Alias /nagios "/usr/local/nagios/share"

    <Directory "/usr/local/nagios/share">
    Options None
    AllowOverride AuthConfig
    Order allow,deny
    Allow from all

    this is my alias ?
  4. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    I don't think you can address two levels in one statement.
    Try something
    ScriptAlias /nagiosbin "/usr/local/nagios/sbin"
    Please try to do some testing yourself. You will learn the most. Look at log files, check if apache loads the correct config, etc.
  5. pillul

    pillul New Member

    For sure you can, it works ;)

    I know how to handle apache php and my distribution.

    I ask a question, if you have no answer plz keep out :D
  6. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    If you know php and your distribution, you wouldn't have asked this question
    I will never ever answer a question from you. I just tried to be polite and helpful but apparently you don't appreciate that. Fine.
  7. pillul

    pillul New Member

    My Apache and PHP configuration is up and running since 2 years.

    I just dont know how ipsconfig disables php.

    Your Politness istn very helpfull. Answer my question or leave my thread. Thanks.

    Till can you give me please a short hint how ispconfig disables php for directorys ?
  8. Craig

    Craig New Member

    ISPConfig doesn't actually "disable" it for directories but instead enables it for specified accounts. So in effect ISPConfig can't enable it for an account that doesn't exist.

    But, ISPConfig doesn't have total control over apache/php/mysql, other than adding directives, aliases etc for what it needs so outside of ISPConfig, you should be able to add whatever configuration information you need.
  9. pillul

    pillul New Member

    Yor right Craig, but in not ISP Folders PHP is "not enabled".

    I looked at the ispconfig_vhosts.conf but cant figure out what parameter enables php. So i believe there must be a other oportunitie
  10. falko

    falko Super Moderator ISPConfig Developer

    You could try a symlink. Or take a look here: http://httpd.apache.org/docs/2.0/urlmapping.html#outside
  11. pillul

    pillul New Member

    Alias and symlink didnt work.

    Now i use a virtual host and this works.

Share This Page