Running Apache2 by Ubuntu Error

I used the installation guide for Ubuntu and MYSQL for OSQA. It was very simple until I got to the last step, which started with the Apache2 server. I double-checked to see if I missed any of the previous steps, and I really missed one. This was the command sudo ln -s / etc / apache2 / sites-available / osqa / etc / apache2 / sites-enabled / osqa. So I ran this command from the root directory. After executing the above command, I again tried to start the Apache2 server. It still didn't work. Then I executed the following commands:

sudo chmod -R g+w /home/osqa/osqa-server/forum/upfiles sudo chmod -R g+w /home/osqa/osqa-server/log 

It did not help. Errors that occur when starting or restarting the server are as follows:

 osqa@osqa-Latitude-E4300 :/$ sudo /etc/init.d/apache2 restart [sudo] password for osqa: Sorry, try again. [sudo] password for osqa: apache2: Syntax error on line 230 of /etc/apache2/apache2.conf: Syntax error on line 7 of /etc/apache2/sites-enabled/osqa: /etc/apache2/sites-enabled/osqa:7: <VirtualHost> was not closed. Action 'configtest' failed. The Apache error log may have more information. ...fail! 

The following installation guide was: http://wiki.osqa.net/display/docs/Ubuntu+with+Apache+and+MySQL

Any help would be greatly appreciated!

+6
source share
4 answers

Your server configuration file has errors. Open /etc/apache2/apache2.conf with a text editor and add the closing VirtualHost tag: </VirtualHost>

+5
source

End virtualhost tag:

</VirtualHost> (it is located after line 7 )

+1
source

It depends on if you start more than one virtual host, you must close each virtual host before starting another

 <VirtualHost 10.1.2.3:80> ServerAdmin webmaster@host.example.com DocumentRoot /www/docs/host.example.com ServerName host.example.com ErrorLog logs/host.example.com-error_log TransferLog logs/host.example.com-access_log </VirtualHost> 
0
source

My problem was that I had some ssl certificates. Make sure your certificate and private key are valid and consistent!

0
source

Source: https://habr.com/ru/post/908663/


All Articles