Hello!
I have a website that uses an ip to access the web instead of a domain name. For example, instead of using abc.com, I use an ip like 168.158.155.11 to access my website. On this vps, I installed aapanel and changed the nginx port there to port 81, then I installed aaWAF on this vps. I created a website based on the IP address that uses port 81 to run, but to access that website I must use 168.158.155.11:81 to access it. So what should I do so that when I type 168.158.155.11 I can access my website and how to install aaWAF to be able to directly secure this ip address? I need it to prevent ddos or access from places I don't want. Please help me solve this problem.
Thank you very much!
How to use aaWAF on the same server?
- Best Answerset by aaP_kienvictory
Hello, I suggest you refer to the usage tutorial. https://www.aapanel.com/forum/d/18726-aawaf-usage-tutorial
aawaf works using a reverse proxy. Add the protected website in aawaf as: IP source address: 127.0.0.1:81
Aawaf is port 80 and the website is port 81. Use ip to access directly
- Edited
aaPanel_Kern
Hello! Do you mean the installation looks like this? I'm not sure.
yes
aaPanel_Kern Thank you very much!
aaPanel_Kern
I set up SSL for aaWAF (https://www.aapanel.com/new/waf.html) following the instructions. I made sure that I pasted the correct private.key and certificate.crt files into their respective fields. However, I still receive an error message. Can you guide me on what to do?
- Edited
View error messages and website configuration
btw admin_debug_log
btw s_c domain_name
aaPanel_Kern
My error is as below, you can see it
[root@bong-05 ~]# btw admin_debug_log
Cloudwaf debug log:
D:/workspace/go_projects/cloudwaf/core/http.go:373 (0x76d0b4)
D:/workspace/go_projects/cloudwaf/core/http.go:69 (0x76a5b6)
D:/workspace/go_projects/cloudwaf/core/http.go:529 (0x76c1a6)
D:/Program Files/Go/src/net/http/server.go:2109 (0x6f400e)
D:/Program Files/Go/src/net/http/server.go:2487 (0x6f59a8)
D:/Program Files/Go/src/net/http/server.go:2947 (0x6f740b)
D:/Program Files/Go/src/net/http/server.go:3556 (0x6f9444)
D:/Program Files/Go/src/net/http/h2_bundle.go:5910 (0x6cad77)
D:/Program Files/Go/src/runtime/asm_amd64.s:1594 (0x46b560)
[root@bong-05 ~]# btw s_c 域名
Error: /www/cloud_waf/nginx/conf.d/vhost/directory, specified file was not found
@aaPanel_Kern can you help this case? I also encountered a similar situation.
Hello, this problem has not been reproduced yet. It is recommended that you check whether the domain name of the certificate is consistent with the domain name of the website?
Also check whether nginx is running normally
btw nginx_reload
@aaPanel_Kern Do you have telegram? I will send you vps account info and you can access VPS & help me fix this error? Thank you
aaPanel_Kern
As I told you above, I use the ip address instead of my domain name. This error only appears when using a domain name of ip form, even though my ssl certificate has been created correctly, it still cannot be added. I tried using my ssl certificate to install ssl for the WAF settings, it was normal and then using ssl to log in to the WAF also worked fine. I tried configuring it manually by editing the .conf file as shown below but it still doesn't work. Do you have any way to set this up manually?
Pls help me! Thank you!
is it possible to install aaWAF in nginx later?