Common Issues
Common Issues
1 Port 80 Occupied Situation
Common when SamWaf and the web application server are on the same server.
1.1 Integrated Environments
1.1.1 Created with Baota
Need to modify two locations:
File 1: /www/server/panel/vhost/nginx/0.default.conf (may not exist initially, wait until a website is created)
File 2: /www/server/panel/vhost/nginx/phpfpm_status.conf1.1.2 Created with PhpStudy
1.2 Native Web Environments
1.2.1 Nginx
Change 80 or 443 to another port.
1.2.2 IIS
Change 80 or 443 to another port.
1.2.3 Apache
Change 80 or 443 to another port.
2 Login-related
2.1 Forgot Password
./SamWaf64 resetpwdSamWaf64.exe resetpwdAfter running the command, the program will list all accounts in the database. If an admin account exists, it will be selected by default; otherwise, you need to enter the number of the account you want to reset.
Example interaction:
Available accounts:
[1] admin [default]
[2] myuser
Please enter account number (press Enter to use default 'admin'):
Reset password for 'admin' successfully, the new password is:
xK9mP2qRtZ7w
Please keep it safe.Tips
If you have renamed the admin account, the program will list all accounts for you to choose from. Enter the corresponding number to complete the reset.
2.2 Token Expiration
For security reasons, starting from v1.3.10-beta.4, the token has an expiration time.
You can modify it according to your needs:
Menu Path: System Settings -> Parameter Settings
token_expire_time
The validity period of the management platform token, in minutes (default is 5 minutes)There are two scenarios for token expiration:
- The token expires after the set time.
- The token becomes invalid when the account is logged in from a different IP address.
2.3 2FA Secret Code cannot Login
./SamWaf64 resetotpSamWaf64.exe resetotp3 Admin Console
3.1 How to Change the Default Port
Go to the config.yml file in the root directory's conf folder:
local_port: 26666 // Local management port