Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

a2enmod command not found in apache server using cpanel in linux vps

Tags:

apache

vps

cpanel

after going to /etc/httpd/conf/httpd.conf and even after changing

Allow override none -> Allow override All , and then restarting the server using 

service httpd restart

and then i type the command

 a2enmod proxy

then i get an error :

bash- a2enmod command not found. . 

Can you please help me? i am getting an error in the developer tools console when i am using web-sockets and so for that i need to enable web-sockets proxy.

like image 783
roh_dev Avatar asked Apr 25 '18 12:04

roh_dev


People also ask

Where is a2enmod located?

On Debian a2enmod is located at /usr/sbin/a2enmod and sometimes /usr/sbin is not in your PATH.

What is a2enmod in Linux?

a2enmod is a script that enables the specified module within the apache2 configuration. It does this by creating symlinks within /etc/apache2/mods-enabled. Likewise, a2dismod disables a module by removing those symlinks.

How do I check Apache version?

If you need to check the Apache version number installed on your server, you can do so in one of a couple of ways. Type apache in the search bar and open up the Apache Status screen. The current Apache version will be displayed next to Server Version on the Apache Status page.


2 Answers

I had the same problem, and this answer solved my issue:

Apache2 command such as a2enmod and a2ensite no working its showing command not found in Ubuntu

Try:

sudo apt-get update
sudo apt-get install apache2 libapache2-mod-wsgi

Then,

sudo a2enmod wsgi

Then, you might also want to try sudo a2enmod instead of just a2enmod

like image 129
Aloïs de La Comble Avatar answered Oct 17 '22 11:10

Aloïs de La Comble


On Debian a2enmod is located at /usr/sbin/a2enmod and sometimes /usr/sbin is not in your PATH.

like image 30
Senthil Avatar answered Oct 17 '22 10:10

Senthil