Hello,
This is the second time I get stuck with the same error. I did a fresh installation on Centos 7 and then added new 3 users from the admin panel. These users are fine, they are able to login to the user panel. Today I'm trying to add a new user and the domain is connected to my server. However when this last user trying to login to this address https://mydomain.com:2083/ instead of getting logged in to user panel, this user get this error message on screen:
404 Not Found
cwpsrv
And this user browser redirect to:
https://mydomain.com:2083/login/%3Chtml%3E%3Chead%3E%3Ctitle%3E404%20Not%20Found%3C/title%3E%3C/head%3E%3Cbody%20bgcolor=%22white%22%3E%3Ccenter%3E%3Ch1%3E404%20Not%20Found%3C/h1%3E%3C/center%3E%3Chr%3E%3Ccenter%3Ecwpsrv%3C/center%3E%3C/body%3E%3C/html%3E
I have no idea what is going on. This user website VHost configuration in my vhosts.conf file is exactly the same, no different with my other users vhost configuration.
User 2 vhost:
# vhost_start userfinedomain.com
<VirtualHost mydomainipaddress:80>
ServerName userfinedomain.com
ServerAlias www.userfinedomain.com
ServerAdmin webmaster@userfinedomain.com
DocumentRoot /home/user2/public_html
UseCanonicalName Off
ScriptAlias /cgi-bin/ /home/user2/public_html/cgi-bin/
# Custom settings are loaded below this line (if any exist)
# Include "/usr/local/apache/conf/userdata/user2/userfinedomain.com/*.conf
<IfModule mod_userdir.c>
UserDir disabled
UserDir enabled user2
</IfModule>
<IfModule mod_suexec.c>
SuexecUserGroup user2 user2
</IfModule>
<IfModule mod_suphp.c>
suPHP_UserGroup user2 user2
suPHP_ConfigPath /home/user2
</IfModule>
<Directory "/home/user2/public_html">
AllowOverride All
</Directory>
</VirtualHost>
# vhost_end userfinedomain.com
User 4 vhost:
# vhost_start userunabetologin.com
<VirtualHost mydomainipaddress:80>
ServerName userunabetologin.com
ServerAlias www.userunabetologin.com
ServerAdmin webmaster@userunabetologin.com
DocumentRoot /home/userunabletologin/public_html
UseCanonicalName Off
ScriptAlias /cgi-bin/ /home/userunabletologin/public_html/cgi-bin/
# Custom settings are loaded below this line (if any exist)
# Include "/usr/local/apache/conf/userdata/userunabletologin/userunabetologin.com/*.conf
<IfModule mod_userdir.c>
UserDir disabled
UserDir enabled userunabletologin
</IfModule>
<IfModule mod_suexec.c>
SuexecUserGroup userunabletologin userunabletologin
</IfModule>
<IfModule mod_suphp.c>
suPHP_UserGroup userunabletologin userunabletologin
suPHP_ConfigPath /home/userunabletologin
</IfModule>
<Directory "/home/userunabletologin/public_html">
AllowOverride All
</Directory>
</VirtualHost>
# vhost_end userunabetologin.com
I replaced real domain name and username with ctrl + shift + f in sublime text, so I believe there will be no mistakes in changing those names for the security reason.
Any help will be much appreciated.
Thank you.
try to execute this script and tell me how it went
sh /scripts/cwpsrv_rebuild_user_conf
Thank you for your reply.
It's still the same.
I still get the same error message on screen:
404 Not Found
cwpsrv
And my browser still redirecting to:
https://mydomain.com:2083/login/%3Chtml%3E%3Chead%3E%3Ctitle%3E404%20Not%20Found%3C/title%3E%3C/head%3E%3Cbody%20bgcolor=%22white%22%3E%3Ccenter%3E%3Ch1%3E404%20Not%20Found%3C/h1%3E%3C/center%3E%3Chr%3E%3Ccenter%3Ecwpsrv%3C/center%3E%3C/body%3E%3C/html%3E
this only happens with a particular user or with all
I executed this line on terminal:
sh /scripts/cwpsrv_rebuild_user_conf
and try to reboot the server with reboot command to see if it get fixed, but things getting more complicated. I am not able to access domain:2087 and mydomain:2083, the admin and users panel. However, All websites hosted to my server are normal and still running.
sh /scripts/restart_cwpsrv
sh /scripts/restart_httpd
Here's the full responses :
[root@server ~]# sh /scripts/restart_cwpsrv
Job for cwpsrv.service failed because the control process exited with error code. See "systemctl status cwpsrv.service" and "journalctl -xe" for details.
[root@server ~]# sh /scripts/restart_httpd
[root@server ~]# systemctl status cwpsrv.service
* cwpsrv.service - CentOS Web Panel service (daemon)
Loaded: loaded (/usr/lib/systemd/system/cwpsrv.service; enabled; vendor preset: disabled)
Active: activating (start-pre) since Thu 2018-08-02 10:20:00 UTC; 96ms ago
Control: 2548 (cwpsrv)
CGroup: /system.slice/cwpsrv.service
> 2548 [cwpsrv]
Aug 02 10:20:00 server systemd[1]: Starting CentOS Web Panel service (daemon)...
Aug 02 10:20:00 server cwpsrv[2548]: cwpsrv: [emerg] SL_CTX_use_PrivateKey_file("/etc/pki/tls/private/hostname.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)
Aug 02 10:20:00 server cwpsrv[2548]: cwpsrv:configuration file /usr/local/cwpsrv/conf/cwpsrv.conf test failed
Aug 02 10:20:00 server systemd[1]: cwpsrv.service: control process exited, code=exited status=1
Aug 02 10:20:00 server systemd[1]: Failed to start CentOS Web Panel service (daemon).
Aug 02 10:20:00 server systemd[1]: Unit cwpsrv.service entered failed state.
Aug 02 10:20:00 server systemd[1]: cwpsrv.service failed.
[root@server ~]#
Hmmm apparently you have a problem with the hostname ssl, you could try this
sh /scripts/generate_hostname_ssl
I'm getting another error below :-\
[root@mydomain ~]# sh /scripts/generate_hostname_ssl
Generating RSA private key, 2048 bit long modulus
.....................................................................+++
......+++
e is 65537 (0x10001)
writing RSA key
Signature ok
subject=/C=HR/ST=Zagreb/O=CentOS Web Panel/L=HR/CN=mydomain.xyz/OU=CentOS Web Panel/emailAddress=info@centos-webpanel.com
Getting Private key
ln: failed to create symbolic link '/etc/pki/tls/private/mydomain.xyz.key': File exists
ln: failed to create symbolic link '/etc/pki/tls/certs/mydomain.xyz.crt': File exists
ln: failed to create symbolic link '/etc/pki/tls/certs/server-cwp.crt': File exists
ln: failed to create symbolic link '/etc/pki/tls/certs/server-dovecot.crt': File exists
ln: failed to create symbolic link '/etc/pki/tls/certs/server-http.crt': File exists
ln: failed to create symbolic link '/etc/pki/tls/certs/server-postfix.crt': File exists
ln: failed to create symbolic link '/etc/pki/tls/private/server-cwp.key': File exists
ln: failed to create symbolic link '/etc/pki/tls/private/server-dovecot.key': File exists
ln: failed to create symbolic link '/etc/pki/tls/private/server-http.key': File exists
ln: failed to create symbolic link '/etc/pki/tls/private/server-postfix.key': File exists
[root@mydomain ~]#
mydomain.xyz is not my real domain anyway, the responses has been edited. Any ideas?
Well, surprisingly my server:2087 and my server:2083 are working now. Everything is working now. The user panel also working for all of my clients.
Thank you so much.
this issue is because you had an issue with hostname key/cert mismatch.
You can check the hostname ssl or generate a new with autossl by saving the same username again.
Oh, I see so the problem was with SSL. I wonder if this problem is rarely happening, right?
sh /scripts/generate_hostname_ssl
And I think this command saves my day, noted. Thank you.
Hey there !
Facing exactely the same issue on a fresh install, event with just 1 single user account.
Did you managed to fix this...?
Another thread is dealing with the problem and talking about redirection being made, but couldn't figure out where's the point !
Best regards
Hello,
Yes I managed to fix the problem. In my case I have the SSL problem. This command does fix the problem:
sh /scripts/generate_hostname_ssl
What do you mean by with just 1 single user? Are you talking about root user? As far as I know, you need to have at least 1 username registered from root user to make the php file to be running by accessing http://ip-address/~username/
I am encountering the same problem, but without it redirecting to a strange address.
Following the instructions in this thread did not help, but also, none of the commands generated any errors.
The log shows:
2018/10/11 15:10:07 [error] 9573#0: *7 open() "/usr/local/cwpsrv/var/services/users/login/index.html" failed (2: No such file or directory), client: *******, server: localhost, request: "GET /index.html?username=cloudope&password=******* HTTP/1.1", host: "*******:2083", referrer: "https://*******4:2083/"
2018/10/11 15:11:14 [error] 9573#0: *22 open() "/usr/local/cwpsrv/var/services/users/login/index.html" failed (2: No such file or directory), client: *******, server: localhost, request: "GET /index.html?username=cloudope&password=******* HTTP/1.1", host: "h03.*******.com:2083"
I noticed that that file indeed does not exsist.
There is an index.php that exists, manually changing the URL for the client panel works.
So how do I fix it redirecting to the wrong address and path ?
It was originally redirecting to the IP and index.html, I want it to redirect to the hostname and index.php.
I have same problem after login.
404 Not Found
cwpsrv
The problem occurred after the update (sh /scripts/update_cwp).
I already tried several commands, but I did not solve the problem.
yum update cwp* --enablerepo=cwp
sh /scripts/cwpsrv_rebuild_user_conf
sh /scripts/restart_cwpsrv
sh /scripts/restart_httpd
What can I do more?
follow this
https://www.mysterydata.com/forum/topic/4-if-you-get-cwp-404-error-upon-login-run-this-commands/
Hello,
Today, I'm not login to admin panel. I'm getting "404 not found" error. I reinstalled cwpsrc package but It failed. How can solve it?
Yesterday, there was not any problem.
Regards
Quote from: Sandeep on December 07, 2018, 06:45:25 AM
follow this
https://www.mysterydata.com/forum/topic/4-if-you-get-cwp-404-error-upon-login-run-this-commands/
I try but not resolve.
I have last version --S $webpanel_version = "0.9.8.746";