• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Block Access to Domain and all web users via http

RolandE

New Pleskian
Apologies if I posted this in the wrong forum originally. :)

Hello,

I have a client who wishes to run one account on plesk purely for FTP (as network drives on Windows). The plesk web user interface is ideal for them as it makes it very easy to create ftp accounts in this way (without my involvement).

However, I need to block all http traffic to this domain and web users directories. I can't password protect them all because they will be created without my involvement. I have therefore tried to add the following to vhost.conf in the domain's conf directory:

<VirtualHost *IP address here*:80>
<Directory /var/www/vhosts/*my domain here*/httpdocs/>
Options None
AllowOverride None
Order deny,allow
Deny from all
</Directory>
</VirtualHost>

I reboot Apache and it makes no difference - whether I specify a web user's folder, the main httpdocs folder, with or without the Virtualhost tags.

I am assuming this is the way to achieve this result but I am open to suggestions. Hopefully someone can advise.

Thanks,


R.
 
What about something like

# /usr/local/psa/admin/sbin/websrvmng --add-protection --vhost-name=domain.com --directory=/var/www/vhosts/domain.com/httpdocs/
 
Hello,

Thanks for your reply, unfortunately it doesn't seem to do anything. Initially it conflicted with my vhost.conf edits. I removed those, reran the command and rebooted apache - doesn't seem to restrict access in any way.

Any more ideas?

R.
 
Could you please describe it with more details - do you need fully disabled web service (http port 80) or you want that it worked, but has been protected?
 
Hi.

I would be happy with http completely blocked on that account only. It also needs to block any web user directories (eg. www.domain.com/~mike/) by default.

All other domains on Plesk need to run normally. It's just this account where I want the customer to use the FTP facilities but with no corresponding website/web access.
 
Hi. Thanks for your help. In the end, once I'd called in the new vhost.conf as per your post, the following worked:

<Directory /var/www/vhosts/domain.com/httpdocs/>
Options None
AllowOverride None
Order deny,allow
Deny from all
</Directory>
 
Back
Top