• 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

Website subdomain - Forbidden access

kadoudal

Regular Pleskian
I have a test website ( Rails deployment)
deployed in the folder: /rails/my_app

with the following vhost.conf :

ServerName mydomain.com
DocumentRoot /var/www/vhosts/mydomain.com/rails/my_app/current/public
<Directory "/var/www/vhosts/mydomain.com/rails/my_app/current/public">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order deny,allow
Deny from all
Allow from all
</Directory>
RailsBaseURI / ( Rails deployment)

for testing purpose ( I want to create subdomains via the API) I created a subdomain : yves.mydomain.com
with the same folder /rails/my_app
trying to access the subdomain, I get a forbidden error ...
what could be wrong ?

thanks for your feedback
 
I guess I have to setup also the subdomain vhost config in
/var/www/vhosts/mydomain.com/subdomains/yves/conf/vhost.conf
with the ServerName yves.mydomain.com
..
then
sudo /usr/local/psa/admin/sbin/httpdmng --reconfigure-domain mydomain.com
and finally
sudo /etc/init.d/apache2 reload

this runs manually , need to find out how to execute it from my app...
 
I never used the Event Manager... so I'll try the 'texan way'.... ;-))
I'll try to:
1- send the xml file to the the PleskAPI so it can set the new subdomain
2- write the subdomain vhost.conf file from my app and run the exec command to copy it on the server and exec the apacheclt reload command
 
Back
Top