/username.downloads index.php

aliasconf
php

#1

Hi folks,

I’m sure this is a config problem,

I know the server has php installed successfully because the main dashboard is php. For some reason, when I add an index.php to the /username.downloads directory, it doesn’t execute, it just shows the code.

I’ve had a look at /etc/apache2/sites-enabled/alias.conf and have found the config for apache

Alias /user.rtorrent.downloads "/home/user/torrents/rtorrent/"
<Directory "/home/user/torrents/rtorrent/">
  Options Indexes FollowSymLinks MultiViews
  AuthType Digest
  AuthName "rutorrent"
  AuthUserFile '/etc/htpasswd'
  Require user user
  AllowOverride None
  Order allow,deny
  allow from all
  php_admin_value engine Off
</Directory>

I’m assuming it might be the php_admin_value engine? If so, is there a security reason why it’s off & what should it be changed to?

Thanks as always for your time :slight_smile:


#2

Going to https://serverip/username.rtorrent.downloads doesn’t work? From here there is nothing out of the ordinary in your alias file.

Why exactly are you attempting to add an index.php file to an alias directory?

Yes, b/c this is a download directory. If we allowed execution of scripts then this could cause issue with certain files that are downloaded by the user. This is meant only as a download directory.


#3

Hi!

I’m trying to add a php file manager (Directory Lister) - it used to be standard on the swizards build.

I found if I removed the Options Indexes & php_admin lines the php script runs perfectly.

every day’s a school day :slight_smile:

I have a backup incase it breaks :slight_smile:

Edit: as for security, that’s good to know - I’m not sharing my box with anybody so it shouldn’t cause any security issues. If I decide to share in the future, I’ll be sure to switch back off. Thanks again bud!


#4

Ah, I see :smiley:

Check this out, as it will be the default in the future release versions, due any day now.

https://plaza.quickbox.io/t/replace-apache-directorylistings-with-h5ai/1536?source_topic_id=2129

#5

you see now! your double reply has totally thrown this conversation out of sync :stuck_out_tongue:

I’ve read about H5ai before, if it’s going to be the default setup I’ll start poking around with it. Thanks for the heads up :slight_smile: It’s nice to see you on here again, hopefully work isn’t holding you up too much these days!


#6

It most certainly is! I’ll have plenty of time coming up here in the next few days… finally some relief after the New Year! Be on the lookout for the new QuickBox.io website also… it’ll be grand! :wink:


#7

looking forward to it. If you need a guinea pig give me a shout - I’m pretty good at breaking stuff :blush: