LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-30-2015, 12:00 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
Apache2 unable to start


Hi,

Mint 17

Just upgade Mint 16 to Mint 17. After fininsh unable to start apache2

# /etc/init.d/apache2 start
Code:
 * Starting web server apache2                                                  
 *
On browser run;
http://localhost
Code:
Index of /
Name	Last modified	Size	Description
Apache/2.4.7 (Ubuntu) Server at localhost Port 80
Click /Name/Last modified/Size/Description without response.

Please help. TIA

Regards
satimis
 
Old 03-30-2015, 12:35 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
You apache has started as it is producing a output in the web browser with http://localhost.

Find the root of web directory and put a test html file and point your browser to it. E.g. http://localhost/test.html

Usually the root of your web directory is '/var/www'. Find it.
 
Old 03-30-2015, 01:09 AM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by veerain View Post
You apache has started as it is producing a output in the web browser with http://localhost.

Find the root of web directory and put a test html file and point your browser to it. E.g. http://localhost/test.html

Usually the root of your web directory is '/var/www'. Find it.
Hi,

Thanks for your advice.

# ls /var/www/
Code:
ballet  classic  hymn        info.php  string
bible   html     index.html  opera     wordpress
html is a directory
ballet /classic/hymn/bible are websites

cat /var/www/index.html
Code:
It works
This is the default web page for this server.
The web server software is running but no content has been added, yet.
/localhost/index.html
Code:
Not Found
The requested URL /index.html was not found on this server.
Apache/2.4.7 (Ubuntu) Server at localhost Port 80
# netstat -ltnp
Code:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      1062/dnsmasq   
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      2609/cupsd     
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1573/mysqld    
tcp6       0      0 :::80                   :::*                    LISTEN      2927/apache2   
tcp6       0      0 ::1:631                 :::*                    LISTEN      2609/cupsd
Regards
satimis
 
Old 03-30-2015, 04:59 AM   #4
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
From your post output it seems that your web root is not /var/www but something else. You should then look at httpd.conf configuration file installed with apache.

There are many articles on web which give setup howto.
 
Old 03-30-2015, 05:05 AM   #5
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by veerain View Post
From your post output it seems that your web root is not /var/www but something else. You should then look at httpd.conf configuration file installed with apache.

There are many articles on web which give setup howto.
Hi,

$ locate httpd.conf
/etc/phpmyadmin/lighttpd.conf

no such file?

On browser running http://localhost/phpmyadmin
Code:
Not Found

The requested URL /phpmyadmin was not found on this server.
Apache/2.4.7 (Ubuntu) Server at localhost Port 80
It worked before upgrading to Mint 17

Regards
satimis
 
Old 03-30-2015, 05:32 AM   #6
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Instead of 'locate' you may try using 'find /etc -name "httpd.conf".

Also see the files in /var/www/html and check whether it's empty, if so put a test html file named index.html and run http://localhost/index.html in a browser.
 
Old 03-30-2015, 05:51 AM   #7
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by veerain View Post
Instead of 'locate' you may try using 'find /etc -name "httpd.conf".

Also see the files in /var/www/html and check whether it's empty, if so put a test html file named index.html and run http://localhost/index.html in a browser.
Hi,

$ sudo find /etc -name "httpd.conf"
No printout

$ ls /var/www/html/
No printout

$ sudo cp /var/www/index.html /var/www/html/
$ ls -al /var/www/html/
Code:
total 12
drwxr-xr-x 2 root root 4096 Mar 30 18:39 .
drwxr-xr-x 6 root root 4096 Mar 30 12:40 ..
-rw-r--r-- 1 root root  177 Mar 30 18:39 index.html
$ sudo service apache2 restart
Code:
 * Restarting web server apache2
On browser:-
http://localhost/index.html
Code:
It works!
This is the default web page for this server.
The web server software is running but no content has been added, yet.
/localhost/phpmyadmin or /localhost/xyz (xyz.domain.com)
Code:
Not Found
The requested URL /phpmyadmin was not found on this server.
Apache/2.4.7 (Ubuntu) Server at localhost Port 80
Before upgrade to Mint 17 they worked.

$ ls /var/www/
Code:
tuv  html  xyz  index.html  info.php  wordpress
move the folders, tuv and xyz, to /var/www/html/ ?

Or symbolic them to /var/www/html/?

How about phpmyadmin? Thanks


Edit:
Verifying on other Mint 16
$ ls /var/www/
Code:
tuv  xyz  index.html  info.php  wordpress
The folder/directory html is not existing


Regards
satimis

Last edited by satimis; 03-31-2015 at 09:25 AM.
 
Old 03-30-2015, 06:20 AM   #8
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
if apache doesnt start type
sudo apache2ctl configtest

and see/post what it gives out
 
Old 03-30-2015, 06:28 AM   #9
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by j-ray View Post
if apache doesnt start type
sudo apache2ctl configtest

and see/post what it gives out
On Mint 17 (upgraded from Mint 16)
$ sudo apache2ctl configtest
Code:
Syntax OK
On Mint 16 (another working VM for comparison)
sudo apache2ctl configtest
Code:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
Regards
satimis
 
Old 03-30-2015, 06:41 AM   #10
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
So indeed the /var/www/html is the web root and apache is working nicely.

I don't know about phpmyadmin but perhaps the upgrade has overwritten the old softwares/configuration files.

Somebody knowledgeable about Mint would help.
 
Old 03-30-2015, 06:46 AM   #11
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by veerain View Post
So indeed the /var/www/html is the web root and apache is working nicely.

I don't know about phpmyadmin but perhaps the upgrade has overwritten the old softwares/configuration files.

Somebody knowledgeable about Mint would help.
I couldn't resolve why /html/ folder/directory will be created after upgrading Mint 16 to Mint 17. Mint is based on Ubuntu

Regards
satimis
 
Old 03-30-2015, 10:30 AM   #12
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Quote:
I couldn't resolve why /html/ folder/directory will be created after upgrading Mint 16 to Mint 17. Mint is based on Ubuntu
Earlier versions of Ubuntu/Mint had /var/www as the Document Root location and the most recent releases have changed it to /var/www/html. I have a web server on a localhost machine with Ubuntu 12.04 and the default location for the Apache files is /var/www. I also have the same set up on Ubuntu 14.04(Mint 17) and the default is /var/www/html and that is where the index.html and Server Root are.

So on the new system, either change your Document Root or move all the directories/files to /var/www/html. The configuration files on Ubuntu 14.04 for apache are in the /etc/apache2 and there is no httpd.conf file. There is an apache2.conf file in this directory. In this directory is a sites-available directory with a file named "000-default.conf" where you can set the Document Root. There is a line in the sites-enabled directory to this file also. I have no idea why they made all these changes.
 
Old 03-30-2015, 11:10 AM   #13
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by yancek View Post
- snip -

So on the new system, either change your Document Root or move all the directories/files to /var/www/html. The configuration files on Ubuntu 14.04 for apache are in the /etc/apache2 and there is no httpd.conf file. There is an apache2.conf file in this directory. In this directory is a sites-available directory with a file named "000-default.conf" where you can set the Document Root. There is a line in the sites-enabled directory to this file also. I have no idea why they made all these changes.
Hi,

Lot of thanks for your advice.

Performed following steps;

# rm /var/www/html/index.html

# cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/000-default.conf.bak

nano /etc/apache2/sites-available/000-default.conf
change - DocumentRoot /var/www/html
to - DocumentRoot /var/www

# service apache2 restart

On browser;
http://localhost
Code:
It works!
This is the default web page for this server.
The web server software is running but no content has been added, yet.
But still I couldn't start the websites

http://localhost/tuv
http://localhost/xyz
No response, only a blank page resulted.

http://localhost/phpmyadmin
Code:
Not Found

The requested URL /phpmyadmin was not found on this server.
Apache/2.4.7 (Ubuntu) Server at localhost Port 80
Please help. Thanks

Regards
satimis
 
Old 03-30-2015, 01:43 PM   #14
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
For wordpress or phpMyAdmin you need PHP to be installed as an apache module. Additionally you have to allow the server to look for index.php, index.html, index.phtml and such as a default page to render when the directory is called. Take a look at apache2.conf. (DirectoryIndex)

Last edited by j-ray; 03-30-2015 at 01:47 PM.
 
Old 03-30-2015, 10:36 PM   #15
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by j-ray View Post
For wordpress or phpMyAdmin you need PHP to be installed as an apache module. Additionally you have to allow the server to look for index.php, index.html, index.phtml and such as a default page to render when the directory is called. Take a look at apache2.conf. (DirectoryIndex)
Hi,

Thanks for your advice.

Mint 17 makes me very frustrating, having spent hours without result.

Performed following steps but still fail:-

sudo ln -s /var/www/xyz /var/www/html/xyz
$ ls -ald /var/www/html/xyz
Code:
lrwxrwxrwx 1 root root 14 Mar 31 11:06 /var/www/html/xyz -> /var/www/xyz
edit /etc/apache2/sites-available/000-default.conf
Change - DocumentRoot /var/www
back to - DocumentRoot /var/www/html

$ sudo service apache2 restart (including reboot the VM)

On browser http://localhost (still work !!!)
Code:
It works!
This is the default web page for this server.
The web server software is running but no content has been added, yet.
http://localhost/xyz still a blank page
http://localhost/phpmyadmin still can't work

apache2.conf is attached to this posting. Suggestion would be appreciated. Thanks

Regards
satimis
Attached Files
File Type: txt apache2.conf.txt (6.8 KB, 14 views)
 
  


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
[SOLVED] BASH: service apache2 start => check apache2 response dragonetti Linux - Newbie 2 10-29-2011 11:01 AM
cannot start apache2 jrella Linux - Software 3 04-28-2009 09:53 AM
Apache2 Installed But Unable to Start and Test rforrister Linux - Server 5 03-19-2007 12:43 PM
How to start Apache2 Rodotheos Linux - Software 4 10-01-2005 06:21 AM
apache2 unable to bind to 0.0.0.0:80 Zaius Linux - Newbie 13 01-23-2004 03:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:30 AM.

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