• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    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.

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