• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Download prompt instead of processing PHP code, after creating an Alias

AdrianC

Basic Pleskian
I tried to install Zabbix statistics on my Plesk (17.8.11), it creates an alias just like phpmyadmin does, but whenever I access the path (/zabbix) it opens a download prompt instead of processing the php code, I am not sure where to edit in order to make it process the php code.

My PHP info page on that server: phpinfo()

This is the file installation created inside /etc/httpd/conf.d/zabbix.conf

Code:
Alias /zabbix /usr/share/zabbix

<Directory "/usr/share/zabbix">
    Options FollowSymLinks
    AllowOverride None

    <IfModule mod_authz_core.c>
      # Apache 2.4
      Require all granted
    </IfModule>

    <IfModule !mod_authz_core.c>
      # Apache 2.2
      Order allow,deny
      Allow from all
    </IfModule>

    <IfModule mod_php5.c>
        php_value max_execution_time 300
        php_value memory_limit 128M
        php_value post_max_size 16M
        php_value upload_max_filesize 2M
        php_value max_input_time 300

        # Removed in PHP 7
        php_value always_populate_raw_post_data -1

        php_flag session.auto_start off
        php_value mbstring.func_overload 0
        php_value date.timezone UTC
    </IfModule>

</Directory>

<Directory ~ "^/usr/share/zabbix/(conf|app|include|local)/">
    <IfModule mod_authz_core.c>
      # Apache 2.4
      Require all denied
    </IfModule>

    <IfModule !mod_authz_core.c>
      # Apache 2.2
      Order deny,allow
      Deny from all
    </IfModule>

    <files *.php>
      <IfModule mod_authz_core.c>
        # Apache 2.4
        Require all denied
      </IfModule>

      <IfModule !mod_authz_core.c>
        Order deny,allow
        Deny from all
      </IfModule>

    </files>

    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
        SetHandler application/x-httpd-php
    </FilesMatch>


</Directory>
 
To simplify, I created a hello world file in /adr/alias/index.php and set this in a conf.d include file:

Code:
Alias /adr /adr/alias

<Directory "/adr/alias">

        <RequireAny>
        Require all granted
        </RequireAny>

</Directory>

I also tried setting folder and file owner same as my www user, e.g me : psacln
The result is the same, I get a download prompt of the code in plain text, and a "denied" unless I add the Require all granted.
 
Back
Top