• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

PHP basdir and port questions

P

Paul M

Guest
A couple of questions;

1. Is there an official way to extend the basdir protection for a domain outside of the httpdocs folder, I want some files accessible to php, but not via the web, I don't want them in /tmp.

2. Again, is there an official way to make a domain respond on another port besides 80.

Atm I edit the domains httpd.include file for these changes - but this means that they get overwritten whenever plesk rewrites the file for some reason (the Listen command is in the main httpd file, so not affected).
 
Originally posted by Mirco
1. Yes, you can add paths to open_basedir with a vhost.conf: http://faq.sw-soft.com/article_41_432_en.html
Thank you, I'll take a look at that.

Originally posted by Mirco
2. You can add add'l ports (Listen directive) to the main httpd.conf
I think you have misunderstood. I've added the Listen command okay, the problem is that each domains virtual host specifies port 80, like this

Code:
<VirtualHost 12.34.56.78:80>
	ServerName   domain.co.uk:80
	ServerAlias  [url]www.domain.co.uk[/url]

I have to manually edit in port 81 ;

Code:
<VirtualHost 12.34.56.78:80 12.34.56.78:81>
	ServerName   domain.co.uk:80
	ServerAlias  [url]www.domain.co.uk[/url]
 
True enough :) - you might want to try iptables with PREROUTING chain to redirect the specified port to port 80
 
Originally posted by Mirco
True enough :) - you might want to try iptables with PREROUTING chain to redirect the specified port to port 80
Hmm, iptables, something new to play with.

I guess that means there is no way to fix it in plesk ?
 
Back
Top