0

I'm new at apache and have a few questions. First of all i'm working on a regional government and I have to set up in my computer a working environment, so I followed a manual they have to do that. But they also have some configuration files preconfigured that I have to copy in a virtual machine running centos which is an application server. Here is the preconfigured apache file:

<VirtualHost *:80>

ServerAdmin sti@guadaltel.es
ServerName sagir.guadaltel.es
ErrorLog logs/sagir.guadaltel.es-error_log
CustomLog logs/sagir.guadaltel.es-access_log common
RewriteEngine on
RewriteRule ^/$ /sagir [R]

<Location /TrewaAdm>
    ProxyPass ajp://localhost:8109/TrewaAdm
    ProxyPassReverse ajp://localhost:8109/TrewaAdm
</Location>

<Location /sagir>
    ProxyPass ajp://localhost:8109/sagir
    ProxyPassReverse ajp://localhost:8109/sagir
</Location>

<Location /sagir2>
    ProxyPass ajp://localhost:8209/sagir2
    ProxyPassReverse ajp://localhost:8209/sagir2
</Location>

</VirtualHost>

Well, my question is about almost everything, what does this file mean? what the tag location is for? Do I have to have a folder named "sagir" or "TrewaAdm". Well any help will be appreciated.

Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47

1 Answers1

0

You should start by reading the user guides for Virtual Hosting and Mapping URLs to the File System. Then read the documentation for the VirtualHost, Location, ProxyPass, and ProxyPassReverse directives. Take time to read and understand that documentation. You'll come back to it over and over again.

No, you don't need to have "sagir" or "TrewaAdm" directories. If someone requests for example http://example.com/sagir from your site, this configuration will proxy (forward) the request by the AJP protocol to a listener on localhost:8109, if there is one on your server.

Good luck!

Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47