Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2007
    Posts
    55

    Change Apache Default Port in Plesk

    Struggling to change the default port for Apache in Plesk.

    I know I can change the "Listen" directive in httpd.conf but this does not reflect in the <virtualhost IP:80> entry in httpd.include for the specific domains and I know that directly changing it there is useless as Plesk will overwrite this sooner or later.

    Nosing around the conf.d directory, I notice all of the plesk generated files have 80 in them and that this remains so after changing the "Listen" directive in httpd.conf and restarting Apache which seems to suggest that port 80 may be hard coded into the Plesk php files.

    I hope this is not the case and that it is possible to change this.

    Thanks

  2. #2
    Just add another Listen directive to /etc/httpd/conf/httpd.conf, or create another config file in /etc/httpd/conf.d/

  3. #3
    Join Date
    Jun 2007
    Posts
    55
    Thanks for replying.

    Do you mean add "Listen 81" in addition to what is already in httpd.conf or to create a conf file in the conf.d directive with this in it?

    Am I right in understanding that with this, when I run websrvmng and/or restart apache, the necessary directives etc will all be changed.

    Thanks again

  4. #4
    You can change it through the etc/httpd/conf/httpd.conf. Any how if you change it, plesk will change it back to default port.
    Support Facility | 24/7 web hosting technical support services
    Technical support | Server management | Data migration

    Technical Articles

  5. #5
    Join Date
    Apr 2005
    Location
    Queen of Arabian Sea
    Posts
    2,433
    Quote Originally Posted by inspiron View Post
    You can change it through the etc/httpd/conf/httpd.conf. Any how if you change it, plesk will change it back to default port.
    Well... not until you run websrvmng binary or update plesk from the control panel
    Sam
    Supportlobby.com - Specialist in Windows Server Management
    Spiralbean.com - Custom Software Development

  6. #6
    Join Date
    Jun 2007
    Posts
    55
    Quote Originally Posted by inspiron View Post
    You can change it through the etc/httpd/conf/httpd.conf. Any how if you change it, plesk will change it back to default port.
    Yes I know this. My OP says ....

    Quote Originally Posted by dayo View Post
    ...but this does not reflect in the <virtualhost IP:80> entry in httpd.include for the specific domains and I know that directly changing it there is useless as Plesk will overwrite this sooner or later.

  7. #7
    Join Date
    Jun 2007
    Posts
    55
    Got some tips on the atomic rocket turtle forum.

    Event triggers calling ....

    Code:
    #!/bin/bash
    MY_FILEPATH="/var/www/vhosts"
    MY_FILE="httpd.include"
    MY_REPLACE=":new-ip"
    find $MY_FILEPATH  -name $MY_FILE -exec perl -p -i -e "s[:80][$MY_REPLACE]g" {} \;
    service httpd restart
    ... is the way to go. This can be amended to deal with other files where changes are needed and I'll expand this start point for flexibility.

  8. #8

Similar Threads

  1. change default IP address of Plesk server
    By noahlau in forum Hosting Software and Control Panels
    Replies: 1
    Last Post: 12-25-2006, 08:17 AM
  2. How do I change the default SSL certificate in Plesk?
    By wa7son in forum Hosting Software and Control Panels
    Replies: 4
    Last Post: 03-21-2006, 08:36 AM
  3. Help! How to change port default of MySQL And SSL
    By HoangJav@ in forum Hosting Security and Technology
    Replies: 2
    Last Post: 01-26-2006, 05:15 PM
  4. Default Apache Port
    By Ricky Smith in forum Dedicated Server
    Replies: 0
    Last Post: 09-14-2005, 07:31 PM
  5. Plesk 5 .. default TTL .. how to change?
    By Goni in forum Hosting Software and Control Panels
    Replies: 1
    Last Post: 12-05-2002, 04:13 AM

Related Posts from theWHIR.com

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •