1

I am using ubuntu 13.04. Initially I had installed apache2 and it was working fine but later it started giving some issues so i removed apache using following commands

sudo apt-get autoremove

sudo apt-get remove apache2*

dpkg -S which apache2

and then i reinstalled apache2 using

sudo apt-get install apache2

Installation was almost done but then i got following message

  • Starting web server apache2
    Syntax error on line 6 of /etc/apache2/sites-enabled/ssl: SSLCertificateFile: file '/etc/apache2/ssl/apache.pem' does not exist or is empty Action 'start' failed. The Apache error log may have more information.

    [fail]

    invoke-rc.d: initscript apache2, action "start" failed. Setting up apache2 (2.2.22-6ubuntu5.1) ...

output to ls /etc/apache2/sites-enabled/ is default-ssl mysite ssl 

content of mysite is ServerAdmin webmaster@localhost

DocumentRoot /home/gautam/apache/
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory /home/gautam/apache/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

after running sudo rm /etc/apache2/sites-enabled/*ssl i am getting the following output and apache2 is OFF

* Restarting web server apache2                                                
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
(98)Address already in use: make_sock: could not bind to address [::]:443
                                                                         [ OK ]

What to do? Any suggestions???

  • ls /etc/apache2/sites-enabled/? add output to question – user.dz Jan 20 '14 at 12:50
  • output to ls /etc/apache2/sites-enabled/ is default-ssl mysite ssl – Gautam-Toraskar Jan 20 '14 at 12:55
  • Remove ssl sites if you don't need https server: sudo rm /etc/apache2/sites-enabled/*ssl then sudo service apache2 restart – user.dz Jan 20 '14 at 13:04
  • ya it started but now if i run localhost it doesn't display the default page – Gautam-Toraskar Jan 20 '14 at 13:10
  • Could add contents of /etc/apache2/sites-enabled/mysite to your question? – user.dz Jan 20 '14 at 13:19
1

I had removed SSL but it was still giving following error:

Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName (98)Address already in use: make_sock: could not bind to address [::]:443 [ OK ]

I googled it out and referred to these 2 posts:

Finally, I disabled the SSL using:

a2dismod ssl

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.