Skip to main content

Unable to install apache2 on an Ubuntu server with cPanel installed.

Comments

3 comments

  • cPRex Jurassic Moderator

    Hey there!  If you installed cPanel on the server you should *not* need to do anything else to install Apache - we preinstall Apache, PHP, MySQL, and many other pieces of software as part of the cPanel installation.  If this did work, this would likely break the installation.

    I'd encourage you to check your WHM interface and look at the EasyApache 4 page to see what all is already installed on your system: https://docs.cpanel.net/ea4/

    0
  • Robert Stegmann

    The commands I need to run are

    sudo a2enmod proxy proxy_http ssl headers
    sudo a2ensite quiz.conf

    Under the EasyApache4 menu in WHM, it shows mod-mpm-prefork, mod-bwlimited, mod-cgi, mod-deflate, mod-expires, mod-headers, mod-prox, mod-proxy-fcgi, mod-proxy-http, mod-proxy-wstunnel, mod-remoteip, mod-ruid, mod-security2, mod-ssl, and mod-unique-id as installed. From what I understand, a2enmod is doing the same as what enabling those in the EasyApache4 menu would, so while I still can't run a2enmod, everything it would enable is already enabled.

    However, I'm still unable to run a2ensite, and I'm not sure what the equivalent functionality for that command would be in WHM.

    0
  • mtindor

    You need to stop thinking of your Apache on your Ubuntu server as "Apache installed on Ubuntu as a standalone service".

    The whole Apache install / control / management, on a cPanel server, regardless of whether it is running on Ubuntu or RHEL / CL / Almalinux etc is all handled within WHM.

    What you are doing is creating site confs manually.   In WHM, when you create a new hosting account, which is tied to a domain name, the appropriate information is added to httpd.conf for that new site to work.   You don't have to manually make up quiz.conf and enable it.  You need to add a hosting account.  Or you can use just one hosting account and host multiple domains under it.

    If you were to add a hosting account in WHM called quizno25 tied to the domain quizknowz.com, you'd have a user account added with:

    /home/quizno25 as the home directory

    /home/quizno25/public_html as the web root (where you put your website)

    And it would set up DNS (on the server) for quizknowz.com.   And it would set up Apache automatically to serve up the content under /home/quizno25/public_html when Apache sees the host header referencing quizknowz.com.

    You seem to be doing everything manually, treating Apache as a standalone application to be managed manually.   And that is not the intent on a WHM/cPanel platform.

     

    0

Please sign in to leave a comment.