Install and Configure Web Application - error while working on first app server

Hi team, could someone help me out so i can understand what i am missing here or doing wrong.

I have a task (subject name) and i did these steps:

  1. Installed httpd package on all three servers
  2. Copied the files from thor jump server to storage server (/data location).
  3. tried to edit httpd config file on first app server (virtual host directive) - also, i did not found it already and added it - attaching my settings i edited and status error what i got (i can start the service back again because of this error):

PLease help out, thanks in advance!!!

Hi,

The closing tag doesn’t look right for me.
Always verify the syntax before starting the service.
sudo apachectl -t

Hope that helps !

@wael.sadek thanks for replying to me. I noticed the its mentioned but i checked the synax on apache web and cant seem to find where its missing since i typed it to be exact like the example on their web. Can you take a look on my settings in the attachment, do you notice the mistake maybe?
thanks!

@ikovacic,

Could you please send the output of “sudo apachectl -t”
Also why you are defining two virtual hosts with the same port number ?

I have noticed that you defined 2 virtual host but in virtualhost you didn’t use right syntax.

<VirtualHost *:8080>
....
</VirtualHost>

https://httpd.apache.org/docs/2.4/vhosts/examples.html
Hope it will give you a correct vision.

@ikovacic

Hi! In the task, they might have mentioned apache must serve on a specific port. Did you change that?

ex: Listen 8080

And also in Virtual Host, you can simply specify:
<VirtualHost *:8080>
DocumentRoot “/var/www/html/cluster”

<VirtualHost *:8080>
DocumentRoot “/var/www/html/official”

Hope this info helps!

Hi @wael.sadek, sorry - i was already “out” of the task so i could not sent it :frowning:
regarding the question, i dont know - i read we should setup to listen on same host with port 8080?

hi @Lakshmi i did change listen to 8080 but i was stuck on the first app server because i had somewhere a syntax error in apache conf file.

so i only type in this manner like this below ? (and i can just add this below the Listen directive?)

<VirtualHost *:8080>
DocumentRoot “/var/www/html/cluster”

<VirtualHost *:8080>
DocumentRoot “/var/www/html/official”

could we catch up on some chat tool not to bother you guys over here, i would like to finish the task and firstly learn what i did wrong :slight_smile:
thanks everyone!

@ikovacic
Have you closed VirtualHost ? It might be the syntax error as you haven’t closed it.