Score:0

404 errors with Virtual Host in VPS Server

gw flag

I'm trying to create a virtual host in my vps server but I'm receiving "HTTP Status 404 - Not found". My Virtual Host:

vi /etc/httpd/conf.d/demonstracao.itcmedbr.com.conf

<VirtualHost *:80>
        ServerName demonstracao.itcmedbr.com
        ServerAlias www.demonstracao.itcmedbr.com
        DocumentRoot /var/www/demonstracao.itcmedbr.com/html
    ErrorLog /var/www/demonstracao.itcmedbr.com/log/error.log

        CustomLog /var/www/demonstracao.itcmedbr.com/log/requests.log combined


        <Directory /var/www/demonstracao.itcmedbr.com/html>
            Options -Indexes +FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>
        ProxyRequests off
        ProxyPreserveHost On
        ProxyPass / http://IPaddr:8081/demonstracao.itcmedbr.com/
        ProxyPassReverse / http://IPaddr:8081/demonstracao.itcmedbr.com/
</VirtualHost>

httpd.conf:

ProxyPass               /demonstracao.itcmedbr.com      http://localhost:8081/demonstracao.itcmedbr.com
ProxyPassReverse        /demonstracao.itcmedbr.com      http://localhost:8081/demonstracao.itcmedbr.com

I'll appreciate any help. Thanks.

gapsf avatar
ng flag
"HTTP Status 404 - Not found" means resource you try to get by url doesnt exists
us flag
Why the two line in `http.conf`? Instead replace `IPaddr:8081` with `localhost:8081` in the `VirtualHost` config file. Assuming the subfolder `demonstracao.itcmedbr.com` exist im the document root for localhost:8081.
Cezar Apulchro. avatar
gw flag
Hi, localhost generate the same problem. The content of DocumentRoot is a deploy of java war, this war have JSPs, Servlet, MySQL db access, Javascript.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.