clops / Nginx-Scripts-for-Plesk

A set of auto-config generation scripts when using NGinx as the main web server on Plesk 10
4 stars 0 forks source link

Plesk 10.4? #1

Closed tr37ion closed 10 years ago

tr37ion commented 12 years ago

Hi, thanks for the script. Unfortunately, it's not working with Plesk 10.4. The most important step:

/usr/local/psa/admin/sbin/websrvmng --set-http-port --port=8080

isn't working anymore. The "-set-http-port" option isn't available with Plesk 10.4.Any ideas?! Thanks.

clops commented 12 years ago

Hm... sounds more like an Apache riddle than Plesk. There are several ways to do this, yet I think this could be the simplest one:

Quote Start :::: For http you need to edit this file /etc/httpd/conf/httpd.conf and change the line Liste 80 to the port number that you wish, like for example Listen 8080

Of course that before changing the ports, make sure that they are not yet in use by another application. For this, run this command at the command promt:

netstat -nl | grep See bellow an example:

netstat -nl | grep 443

tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN tcp 0 0 :::1443 :::* LISTEN

In this case port 443 is available so I can use it.

After changing the files you need to reconfigure/resync Plesk. Eventually manual restart Apache.

tr37ion commented 12 years ago

It was simply an outdated command I used. With Plesk 10.4

  1. I changed the default port to 8080 in /etc/apache2/sites-enabled/default file to
     < VirtualHost *:8080> 
  2. Change "NameVirtualHost *:80" and "Listen 80" in /etc/apache2/ports.conf to
    NameVirtualHost *:8080
    Listen 8080
  3. Modify ports in the psa.misc table via the these terminal commands

    mysql -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e'replace into misc (paramal) values ("http_port", 8080)'
    mysql -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e'replace into misc (param, val) values ("https_port", 8083)'
  4. Resync Plesk 10.x with

    /usr/local/psa/admin/bin/httpdmng --reconfigure-all

That should help withall PLesk 10.x versions as youcan read in the corresponding Plesk KB: http://kb.parallels.com/11232

I must say it took me hours to find this out and I read somewhere that Plesk 11 should work with nginx as Apache Proxy by default. I hope this helps. Maybe it's possible to implement this solution in your script?!

PS: Btw I installed the Debian Squeeze Backports packages "nginx-full".