javismiles
Basic Pleskian
dear friends,
im a bit desperate about this issue, i hope you can help me
I have a centos 6 , plesk 11.5 latest version all updates in,
i have a domain.com set on /var/www/vhosts/domain.com/httpdocs
now i have created a subdomain secure.domain.com, with cname pointings to main one (secure->domain.com) , i need it to point to same folder than main domain so i pointed it to the main folder of domain.com by
creating a custom vhost.conf for apache and that works great, as i see htaccess is getting processed so i assume apache is now pointing correctly
but nginx is pointing still to wrong folder, logical as i can see that the last_nginx.conf file is pointing to wrong place
so i found the thread http://forum.parallels.com/showthread.php?260814-Nginx-configuration-for-vhosts
and i followed the indications there but its not working for me,
- i have edited a file nginxDomainVirtualHost.php
on /usr/local/psa/admin/conf/templates/custom/domain
after copying from the default folder
and i added this as you indicated
<?php if (file_exists($VAR->domain->physicalHosting->vhostDir . '/conf/nginx.conf')): ?>
include <?php echo $VAR->domain->physicalHosting->vhostDir;?>/conf/nginx.conf;
<?php endif ?>
just i wasnt sure where to add it, i added it at the very end before the last }
and then i added an nginx.conf inside
/var/www/vhosts/system/secure.domain.com/conf
and inside i just put
root "/var/www/vhosts/domain.com/httpdocs"
and then i did of course the /usr/local/psa/admin/bin/httpdmng --reconfigure-all
but nothing happened
when i go to secure.domain.com i keep getting 404 nginx errors,
however the apache is pointing to right place because the .htaccess of main folder is getting processed, so apache all good,
but all php and non php pages are failing with 404 nginx errors still
i now tried something different, in plesk 11.5
i went to web server settings of the subdomain
and in extra nginx directives i added
location ~ /$ {
root /var/www/vhosts/domain.com/httpdocs;
}
and then restarted nginx
and now something changed
now when going to secure.domain.com instead of getting a 404 not found,
i get a 403 forbidden
other than that if i try
secure.domain.com/index.php i still get 404 error and same for other files
but now i get a 403 instead of 404 when going to the bare secure.domain.com
other than that i am very puzzled because if i try to go to some php files, the php files get downloaded to the client which is disastrous as people could get the php files from the server,
why are they getting downloaded to the client?
thank you for any help, really appreciate it
best
im a bit desperate about this issue, i hope you can help me
I have a centos 6 , plesk 11.5 latest version all updates in,
i have a domain.com set on /var/www/vhosts/domain.com/httpdocs
now i have created a subdomain secure.domain.com, with cname pointings to main one (secure->domain.com) , i need it to point to same folder than main domain so i pointed it to the main folder of domain.com by
creating a custom vhost.conf for apache and that works great, as i see htaccess is getting processed so i assume apache is now pointing correctly
but nginx is pointing still to wrong folder, logical as i can see that the last_nginx.conf file is pointing to wrong place
so i found the thread http://forum.parallels.com/showthread.php?260814-Nginx-configuration-for-vhosts
and i followed the indications there but its not working for me,
- i have edited a file nginxDomainVirtualHost.php
on /usr/local/psa/admin/conf/templates/custom/domain
after copying from the default folder
and i added this as you indicated
<?php if (file_exists($VAR->domain->physicalHosting->vhostDir . '/conf/nginx.conf')): ?>
include <?php echo $VAR->domain->physicalHosting->vhostDir;?>/conf/nginx.conf;
<?php endif ?>
just i wasnt sure where to add it, i added it at the very end before the last }
and then i added an nginx.conf inside
/var/www/vhosts/system/secure.domain.com/conf
and inside i just put
root "/var/www/vhosts/domain.com/httpdocs"
and then i did of course the /usr/local/psa/admin/bin/httpdmng --reconfigure-all
but nothing happened
when i go to secure.domain.com i keep getting 404 nginx errors,
however the apache is pointing to right place because the .htaccess of main folder is getting processed, so apache all good,
but all php and non php pages are failing with 404 nginx errors still
i now tried something different, in plesk 11.5
i went to web server settings of the subdomain
and in extra nginx directives i added
location ~ /$ {
root /var/www/vhosts/domain.com/httpdocs;
}
and then restarted nginx
and now something changed
now when going to secure.domain.com instead of getting a 404 not found,
i get a 403 forbidden
other than that if i try
secure.domain.com/index.php i still get 404 error and same for other files
but now i get a 403 instead of 404 when going to the bare secure.domain.com
other than that i am very puzzled because if i try to go to some php files, the php files get downloaded to the client which is disastrous as people could get the php files from the server,
why are they getting downloaded to the client?
thank you for any help, really appreciate it
best