Unauthorized 404 not found


#1

I had worked on few server with below conf however it report unauthorized as below.
Is there any idea what should i do???

my Ubuntu 17.10
and apache is Apache/2.4.27 (Ubuntu)

 <VirtualHost *:80>

            ServerName dev.tattle.systems
            ServerAdmin webmaster@localhost

            DocumentRoot /var/www/html

            ProxyPass /api/socket ws://localhost:8082/api/socket
            ProxyPassReverse /api/socket ws://localhost:8082/api/socket

            ProxyPass / http://localhost:8082/
            ProxyPassReverse / http://localhost:8082/
    </VirtualHost>
            ServerName dev.tattle.systems
            ServerAdmin webmaster@localhost

            DocumentRoot /var/www/html

            ProxyPass /api/socket ws://localhost:8082/api/socket
            ProxyPassReverse /api/socket ws://localhost:8082/api/socket

            ProxyPass / http://localhost:8082/
            ProxyPassReverse / http://localhost:8082/

            
            SSLEngine on
            SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
            SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

    </VirtualHost>

IMPORTANT NOTES:


#2

What’s the command you used to try issue the certificate?

Your first virtual host (the port 80) one appears to not have any effect, it goes to the Apache default webpage rather than applying your ProxyPass: http://dev.tattle.systems

What do your vhosts look like?

apachectl -S

#3

please go below to check my message thanks


#4

i use sudo certbot --apache to get the certificate
i follow below two to get my certificate
https://www.traccar.org/secure-connection/

thanks i am not too good with this


#5

i got below code if i command apachectl -S

VirtualHost configuration:
*:80 is a NameVirtualHost
default server dev.tattle.systems (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost dev.tattle.systems (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost dev.tattle.systems (/etc/apache2/sites-enabled/new.conf:1)
*:443 dev.tattle.systems (/etc/apache2/sites-enabled/new.conf:17)
ServerRoot: “/etc/apache2”
Main DocumentRoot: “/var/www/html”
Main ErrorLog: “/var/log/apache2/error.log”
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex watchdog-callback: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
PidFile: “/var/run/apache2/apache2.pid”
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name=“www-data” id=33
Group: name=“www-data” id=33


#6

See how these are for the same domain and port, but are in two different files?

I think that’s causing problems with Certbot.

You want to make sure that only one of these VirtualHosts for port 80 exist, because only one of them will do anything.

Remove whichever duplicate VirtualHosts don’t contain the correct configuration for dev.tattle.systems:80.


#7

thanks so much :grin:


#8

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.