LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-21-2018, 06:39 PM   #1
ks1293
LQ Newbie
 
Registered: Sep 2018
Posts: 1

Rep: Reputation: Disabled
Question ssl certificates - getting syntax errors


httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.d/ssl.conf: /etc/httpd/conf.d/ssl.conf:8: <\\VirtualHost> was not closed.\n/etc/httpd/conf.d/ssl.conf:1: <VirtualHost> was not closed

I looked at both httpd.conf and ssl.conf files but not sure what is causing the syntax errors.
Any help is much appreciated.

Last edited by ks1293; 09-21-2018 at 06:41 PM.
 
Old 09-21-2018, 07:39 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,732

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by ks1293 View Post
httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.d/ssl.conf: /etc/httpd/conf.d/ssl.conf:8: <\\VirtualHost> was not closed.\n/etc/httpd/conf.d/ssl.conf:1: <VirtualHost> was not closed

I looked at both httpd.conf and ssl.conf files but not sure what is causing the syntax errors.
Any help is much appreciated.
It's difficult to help since you didn't share the relevant parts of those conf files, but
those are pretty clear error messages. Syntax of a VirtualHost directive should look something like this
Code:
<VirtualHost 123.45.67.89:80>
ServerAdmin support@mydomain.com
DocumentRoot /var/www/html/mydomain
ServerName mydomain.com
ServerAlias www.mydomain.com
  	Redirect permanent / https://mydomain.com
ErrorLog logs/mydomain-error_log
CustomLog logs/mydomain-access_log combined
</VirtualHost>
The </VirtualHost> at the end is missing...and you apparently have a typo in /etc/httpd/conf.d/ssl.conf, too.

See the Apache Documentation

Last edited by scasey; 09-21-2018 at 07:43 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Chrome bug triggered errors on websites using Symantec SSL certificates LXer Syndicated Linux News 0 12-06-2016 07:22 PM
SSL Certificates irvinew31 SUSE / openSUSE 2 10-03-2006 10:27 AM
SSL Certificates ashiers Linux - Security 2 06-30-2006 08:39 AM
ssl certificates champ Linux - Security 2 04-05-2003 09:47 AM
ssl certificates Syncrm Linux - General 7 02-26-2003 10:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration