New server setup

Its only your decision, or nginx+apache or LiteSpeed - you can't use three :)
read reviews/comparisons etc..
 
I heard LS is best as compare to nginx and Apache but if we go for free solution then nginx is better than Apache but as I feel Apache is very stable as compare to other free web servers
 
Nginx is more a caching proxy frontend for apache, you have still apache with its lot of child processes and eating RAM, when you have more users and visitors. LS on the other side handle this mostly in CPU, you can host much more users without eating lot of RAM. LS Lite is free, Nginx is free. The really goodies coming with LS Enterprise (start with 1-cpu-license, you can scale up later if needed), and your users can use the WP and Joomla Plugins for LS, which add a lot more functionality than nginx. And you get support. Check/google for comparisons, look at the developer sites.
 
I can test this setting on a server is there any tutorial how I can activate and verify is it working or not also it will work for WordPress website ?
In DirectAdmin the MPM module can be selected by using Custombuild or by editing /usr/local/directadmin/custombuild/options.conf

For Nginx, follow these steps from my personal blog:
 
caching proxy frontend for apache,
so we should use nginx and Apache both together,
LS Enterprise
yes it's best, and I will use this for my this new server as I am planning to hold 2000 to 5000 users it will help me a lot

I read on LS website

Web Host Enterprise​

From $65.00/mo

it has 4 work process, so it can help more
 
so we should use nginx and Apache both together,
most people are using nginx as frontend for apache, as it brings the full apache functionality with it inside. but yes, you can run nginx also standalone (without apache), with several caveeats, ex. htaccess handling.

Web Host Enterprise
From $65.00/mo
it has 4 work process, so it can help more
I´d recommend start with "webhost essential" or "webhost pro" and do some loadtesting first. you can scale-up at every point later if you really need, and spare money.
 
google translator
cd /usr/local/directadmin/custombuild
./build update
./build set webserver nginx_apache
./build nginx_apache

vi /etc/nginx/nginx-includes.conf

# use any of the following two
real_ip_header CF-Connecting-IP;
#real_ip_header X-Forwarded-For;
whith this my apeach server will keep running and I will have nginx as cache ?
 
cd /usr/local/directadmin/custombuild
./build update
./build set webserver nginx_apache
./build nginx_apache

vi /etc/nginx/nginx-includes.conf

# use any of the following two
real_ip_header CF-Connecting-IP;
#real_ip_header X-Forwarded-For;
whith this my apeach server will keep running and I will have nginx as cache ?
Yes. Also add: ./build rewrite_confs

 
i got this error after doing this and my all website down lol it was a small server i have back to apach to keep it alive

[root@sig custombuild]# systemctl status nginx

● nginx.service - The nginx HTTP and reverse proxy server

Loaded: loaded (/etc/systemd/system/nginx.service; enabled; vendor preset: disabled)

Active: failed (Result: exit-code) since Sat 2023-03-18 22:25:30 PKT; 16s ago

Process: 743626 ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)




Mar 18 22:25:29 sig.mydomaincom systemd[1]: Starting The nginx HTTP and...


Mar 18 22:25:30 sig.mydomain.com nginx[743626]: nginx: [emerg] "modsecur...


Mar 18 22:25:30 sig.mydomain.com nginx[743626]: nginx: configuration fil...


Mar 18 22:25:30 sig.mydomain.com nginx[743626]: t:none,t:urlDecode


Mar 18 22:25:30 sig.mydomain.com systemd[1]: nginx.service: control proc...


Mar 18 22:25:30 sig.mydomain.com systemd[1]: Failed to start The nginx H...


Mar 18 22:25:30 sig.mydomain.com systemd[1]: Unit nginx.service entered ...


Mar 18 22:25:30 sig.mydomain.com systemd[1]: nginx.service failed.

Hint: Some lines were ellipsized, use -l to show in full.

[root@sig custombuild]# systemctl status nginx -l

● nginx.service - The nginx HTTP and reverse proxy server

Loaded: loaded (/etc/systemd/system/nginx.service; enabled; vendor preset: disabled)

Active: failed (Result: exit-code) since Sat 2023-03-18 22:25:30 PKT; 25s ago

Process: 743626 ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)
 
i got this error after doing this and my all website down lol it was a small server i have back to apach to keep it alive

[root@sig custombuild]# systemctl status nginx

● nginx.service - The nginx HTTP and reverse proxy server

Loaded: loaded (/etc/systemd/system/nginx.service; enabled; vendor preset: disabled)

Active: failed (Result: exit-code) since Sat 2023-03-18 22:25:30 PKT; 16s ago

Process: 743626 ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)




Mar 18 22:25:29 sig.mydomaincom systemd[1]: Starting The nginx HTTP and...


Mar 18 22:25:30 sig.mydomain.com nginx[743626]: nginx: [emerg] "modsecur...


Mar 18 22:25:30 sig.mydomain.com nginx[743626]: nginx: configuration fil...


Mar 18 22:25:30 sig.mydomain.com nginx[743626]: t:none,t:urlDecode


Mar 18 22:25:30 sig.mydomain.com systemd[1]: nginx.service: control proc...


Mar 18 22:25:30 sig.mydomain.com systemd[1]: Failed to start The nginx H...


Mar 18 22:25:30 sig.mydomain.com systemd[1]: Unit nginx.service entered ...


Mar 18 22:25:30 sig.mydomain.com systemd[1]: nginx.service failed.

Hint: Some lines were ellipsized, use -l to show in full.

[root@sig custombuild]# systemctl status nginx -l

● nginx.service - The nginx HTTP and reverse proxy server

Loaded: loaded (/etc/systemd/system/nginx.service; enabled; vendor preset: disabled)

Active: failed (Result: exit-code) since Sat 2023-03-18 22:25:30 PKT; 25s ago

Process: 743626 ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)
What the command says: journalctl -xe?
 
journalctl -xe
I have reverted to Apache and rebuild it, because I start getting complaints
do you still want me to perform command ? or i will try late night and perform this command and share result with you btw can we use grep for specific result as i can see xe command will show lot of things
 
captura.png

cap2.png

Hello. I just installed Apache2 and nginx in a virtual machine with a Debian. Apache and Nginx use port 80 by default. That's why it doesn't start.

What the command says: journalctl -xe |grep nginx?
 
Last edited:
Hi.

Edit /etc/apache2/ports.conf and put port 8080 (Listen 8080)

systemctl restart apache2

systemctl restart nginx

Its ok!

Nginx will be on 80 and Apache will be on another port.

conections.png
 
Last edited:
okay, let me explain @Nando
i will perform
cd /usr/local/directadmin/custombuild
./build update
./build set webserver nginx_apache
./build nginx_apache
./build rewrite_confs
nano /etc/nginx/nginx-includes.conf (no such file) i got error last time

then
/etc/apache2/ports.conf and put port 8080 (Listen 8080)

systemctl restart apache2

systemctl restart nginx

is it or i have to do something else as well

what i want to achive
1. Apache as web server
2. nginx as cache as you suggested having better page speed and caching for my customers to have better performance

if you or anyone wants to suggest any other cache system, i don't mind and i will thankful to you guys
 
what i want to achive
1. Apache as web server
2. nginx as cache as you suggested having better page speed and caching for my customers to have better performance

Easy, only you have to do is :

Code:
cd /usr/local/directadmin/custombuild
./build update
./build update_da
./build set webserver nginx_apache
./build nginx_apache
./build rewrite_confs

Normally it is not necessary to manually edit any file.

 
Last edited:
Hi.

Step 1:

Code:
cd /usr/local/directadmin/custombuild
./build update
./build update_da
./build set webserver nginx_apache
./build nginx_apache
./build rewrite_confs

Step 2:

Nginx will be on 80 and Apache will be on another port 8080. Nginx transfers the dynamic page requests to Apache on this port. For deploying reverse proxy after compiling and building Nginx webserver, we will need to rewrite all configurations on the server. For rewriting the configurations execute the below commands.

Code:
./build update
./build all d
./build rewrite_confs

Step 3:

Code:
netstat -pta

Greetings.
 
Greetings.
thank you very much for your response and support
i am going to install Litesped enterprise version do i still need nginx proxy ? or i can use something better ?
 
Back
Top