Memory Manual Instrumentation
- 21 Sep 2023
- 2 Minutes to read
- Print
- DarkLight
- PDF
Memory Manual Instrumentation
- Updated on 21 Sep 2023
- 2 Minutes to read
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
About this Article
This article provides Memory Protection manual instrumentation configuration settings for Apache HTTP server and NGINX server.
Apache HTTP Server
Linux Server RHEL/CentOS 7.X
- Log in to the Linux Host (RHEL/CentOS) that has Apache Server installed
- If the Apache Server is running, stop it using the below commands:
ORservice httpd stop
<Apache_Directory>/httpd -k stop
- Verify that all the httpd processes are stopped using the below command:
ps -ef | grep -i httpd
- If the httpd processes are still running, kill them using:
kill -9 <httpd-pid>
- Start the httpd2.4 Server with VSP protection using the below command:
OR/opt/virsec-web-mem/vsp_memory/vsp-memory <Apache_Directory>/httpd -k start
- Start the httpd2.4 Server with VSP protection as a Service
cd /usr/lib/systemd/system/ vi httpd.service
- Append the below text to the ExecStar argument
Before Change:/opt/virsec-web-mem/vsp_memory/vsp-memory
After Change:#Type=notify ExecStart=<Apache_Directory>/httpd $OPTIONS -DFOREGROUND
#Type=notify ExecStart=/opt/virsec-web-mem/vsp_memory/vsp-memory <Apache_Directory>/httpd $OPTIONS -DFOREGROUND
- Save the file httpd.service
- Execute the below commands to start the service:
systemctl daemon-reload service httpd start
- Append the below text to the ExecStar argument
Ubuntu Server 14.x ,16.x and 18.x
- Log in to the Ubuntu Host that has Apache Server installed
- If the Apache Server is running, stop it using the below commands:
ORservice apache2 stop
<Apache_Directory>/apache2 -k stop
- Verify that all the httpd processes are stopped using the below command:
ps -ef | grep -i apache2
- If the httpd processes are still running, kill them using:
kill -9 <apache2-pid>
- Start the Apache Server with VSP protection using the below command:
OR/opt/virsec-web-mem/vsp_memory/vsp-memory <Apache_Directory>/apache2 -k start
- Start the Apache Server with VSP protection as a Service
cd /usr/sbin/ vi apachectl
- Append the below text to the HTTPD argument
Before Change:/opt/virsec-web-mem/vsp_memory/vsp-memory
After Change:HTTPD=${APACHE_HTTPD:-/usr/sbin/apache2}
HTTPD="/opt/virsec-web-mem/vsp_memory/vsp-memory ${APACHE_HTTPD:-/usr/sbin/apache2}"
- Save the file
- Execute the below commands to start the service:
systemctl start apache2
- Append the below text to the HTTPD argument
Windows Server
- Log in to the Windows Host that has Apache Server installed
- If the Apache Server is running, stop it as described below:
- At the command prompt, navigate to the directory: <Apache_Home>/bin
- Start the Httpd2.4 Server with VSP protection through command line
OR"C:\Program Files (x86)\Virsec\virsec-web-mem\vsp_memory\vsp-memory.exe" <Apache_Home>\bin\httpd.exe
- Start the Httpd2.4 Server with VSP protection as a Service
- Verify the Apache service name in services.msc
- Modify registry entry for Apache2.4 under the below path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache2.4
Modify ImagePath to add the below path before httpd.exe:C:\Program Files (x86)\Virsec\virsec-web-mem\vsp_memory\vsp-memory.exe
- Restart the Apache2.4 service from services.msc
NOTE
Apache2.4 mentioned above is the service name. This value may vary in the target server. Replace it accordingly with the respective service name
Nginx Server
Linux Server RHEL/CentOS 7.X
- Log in to the RHEL/CentOS Host that has Nginx Server installed
- If the Nginx Server is running, stop it using the below commands:
ORservice nginx stop
<Nginx_Directory>/nginx -s stop
- Verify that all the Nginx processes are stopped using the below command:
ps -ef | grep -i nginx
- If the Nginx processes are still running, kill them using:
kill -9 <nginx-pid>
- Start the Nginx Server with VSP protection using the below command:
OR/opt/virsec-web-mem/vsp_memory/vsp-memory <Nginx_Directory>/nginx
- Start the Nginx Server with VSP protection as a Service
cd /etc/systemd/system/multi-user.target.wants vi nginx.service
- Append the below text to the ExecStar argument
Before Change:/opt/virsec-web-mem/vsp_memory/vsp-memory
After Change:ExecStart=<Nginx_Directory>/nginx -c /etc/nginx/nginx.conf
ExecStart=/opt/virsec-web-mem/vsp_memory/vsp-memory <Nginx_Directory>/nginx -c /etc/nginx/nginx.conf
- Save the file nginx.service
- Execute the below commands to start the service:
systemctl daemon-reload service nginx start
- Append the below text to the ExecStar argument
Ubuntu Server 14.x ,16.x and 18.x
- Log in to the Ubuntu Host that has Nginx Server installed
- If the Nginx Server is running, stop it using the below commands:
ORservice nginx stop
<Nginx_Directory>/nginx -s stop
- Verify that all the Nginx processes are stopped using the below command:
ps -ef | grep -i nginx
- If the Nginx processes are still running, kill them using:
kill -9 <nginx-pid>
- Start the Nginx Server with VSP protection using the below command:
OR/opt/virsec-web-mem/vsp_memory/vsp-memory <Nginx_Directory>/nginx
- Start the Nginx Server with VSP protection as a Service
cd /etc/systemd/system/multi-user.target.wants vi nginx.service
- Append the below text to the ExecStar argument
Before Change:/opt/virsec-web-mem/vsp_memory/vsp-memory
After Change:ExecStart=<Nginx_Directory>/nginx -g 'daemon on; master_process on;'
ExecStart=/opt/virsec-web-mem/vsp_memory/vsp-memory <Nginx_Directory>/nginx -g 'daemon on; master_process on;'
- Save the file nginx.service
- Execute the below commands to start the service:
systemctl daemon-reload systemctl start nginx
- Append the below text to the ExecStar argument
Was this article helpful?