D
D
Diman892017-12-29 22:57:21
Apache HTTP Server
Diman89, 2017-12-29 22:57:21

Apache config error?

I'm trying to raise my cloud according to the article: https://geektimes.ru/post/294997
It seems that at the last stage of restarting Apache, it stops starting, the apache2ctl configtest utility says the following:

apache2ctl configtest
apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Syntax error on line 15 of /etc/apache2/sites-enabled/nextcloud.conf: </VirtualHost> without matching <VirtualHost> section
Action 'configtest' failed.
The Apache error log may have more information.

Those. there is an error somewhere:
Alias /nextcloud "/var/www/nextcloud/"
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
</Directory>
<VirtualHost *:443>
ServerName <span style="color: #ff0000;">ваш_домен</span>
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"</IfModule>
</VirtualHost>

I myself understand this a little more than nothing; I contacted the author - to which the answer was "I'm in China, here the Civil Code does not open, everything should work."
Can you tell me what needs to be corrected and where?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Diman89, 2017-12-31
@Diman89

he asked, he answered:

Alias /nextcloud "/var/www/nextcloud/"
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
</Directory>
<VirtualHost *:443>
ServerName www.mysite.com
</VirtualHost>
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>

P
Pavel K, 2017-12-29
@PavelK

Replace
<span style="color: #ff0000;">ваш_домен</span> with serverName

C
CityCat4, 2017-12-30
@CityCat4

The ServerName directive cannot contain any garbage other than the domain name.
For example: ServerName www.nichego.net

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question