logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: virtual host - not found
Author
Wagner



Joined: 26 Sep 2020
Posts: 2
Location: Brazil, São Paulo

PostPosted: Mon 28 Sep '20 15:15    Post subject: virtual host - not found Reply with quote

I have a production server running apache (2.4.1Cool with ubuntu 16.04 containing some sites running https without problems.

There was a need to test an application on the server running on http and here I am having problems ..

When I create a virtual host associated with the application's index directory, Apache returns “Not Found”.

Researching the subject a little, I am in doubt if this type of message has to do with the option of redirecting http to https when I created the certificates by certbot.

I can get around the situation by opening a specific door for in ports.conf access: (8080) directly in the application directory and this has worked, but I understand that it is a workaround and can put the server's security at risk.

In summary I need to create a virtual http host on this server that has only SSL certificates running and I'm not getting it.

Any help will be welcome
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 05 Oct '20 9:29    Post subject: Reply with quote

Here is an example for a SSL vhost

https://gist.github.com/JBlond/3d58a1a2e66ce0e42413d9015377a72c

If you still have a question please ask again.
Back to top
Wagner



Joined: 26 Sep 2020
Posts: 2
Location: Brazil, São Paulo

PostPosted: Wed 07 Oct '20 0:52    Post subject: virtual host - not found Reply with quote

Hi James
Thanks for the feedback.
Maybe it wasn't clear ...

My problem is making Apache allow access to an http page on port 80.

The SSL sites on port 443 are ok!

my configuration file:

<VirtualHost *: 80>

ServerName mysite.com.br
ServerAlias www.mysite.com.br
ServerAdmin webmaster @ localhost

DocumentRoot / var / www / html / _apache_test

</VirtualHost>

added the line to / etc / hosts:

45.231.nnn.41 mysite.com.br
Back to top


Reply to topic   Topic: virtual host - not found View previous topic :: View next topic
Post new topic   Forum Index -> Apache