Author Topic: 404 Not Found User Login  (Read 1223 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
404 Not Found User Login
« on: August 02, 2018, 07:26:00 AM »
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:
Code: [Select]
# 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:
Code: [Select]
# 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.

Offline
*
Re: 404 Not Found User Login
« Reply #1 on: August 02, 2018, 09:34:48 AM »
try to execute this script and tell me how it went

Code: [Select]
sh /scripts/cwpsrv_rebuild_user_conf

Offline
*
Re: 404 Not Found User Login
« Reply #2 on: August 02, 2018, 09:49:39 AM »

Offline
*
Re: 404 Not Found User Login
« Reply #3 on: August 02, 2018, 10:01:12 AM »
this only happens with a particular user or with all

Offline
*
Re: 404 Not Found User Login
« Reply #4 on: August 02, 2018, 10:06:13 AM »
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.

Offline
*
Re: 404 Not Found User Login
« Reply #5 on: August 02, 2018, 10:11:51 AM »
Code: [Select]
sh /scripts/restart_cwpsrv
sh /scripts/restart_httpd

Offline
*
Re: 404 Not Found User Login
« Reply #6 on: August 02, 2018, 10:22:02 AM »
Here's the full responses :

Code: [Select]
[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 ~]#

Offline
*
Re: 404 Not Found User Login
« Reply #7 on: August 02, 2018, 10:26:22 AM »
Hmmm apparently you have a problem with the hostname ssl, you could try this

Code: [Select]
sh /scripts/generate_hostname_ssl

Offline
*
Re: 404 Not Found User Login
« Reply #8 on: August 02, 2018, 11:57:35 AM »
I'm getting another error below  :-\

Code: [Select]
[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?

Offline
*
Re: 404 Not Found User Login
« Reply #9 on: August 02, 2018, 12:02:03 PM »
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.

Offline
*
Re: 404 Not Found User Login
« Reply #10 on: August 02, 2018, 01:24:55 PM »
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.
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: 404 Not Found User Login
« Reply #11 on: August 03, 2018, 01:24:45 AM »
Oh, I see so the problem was with SSL. I wonder if this problem is rarely happening, right?

Code: [Select]
sh /scripts/generate_hostname_ssl

And I think this command saves my day, noted. Thank you.

Offline
*
Re: 404 Not Found User Login
« Reply #12 on: August 21, 2018, 12:53:41 PM »
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

Offline
*
Re: 404 Not Found User Login
« Reply #13 on: August 24, 2018, 09:11:35 AM »
Hello,

Yes I managed to fix the problem. In my case I have the SSL problem. This command does fix the problem:
Code: [Select]
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/
« Last Edit: August 24, 2018, 09:13:09 AM by ansyori28 »

Offline
*
Re: 404 Not Found User Login
« Reply #14 on: October 11, 2018, 07:18:02 PM »
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"