LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-24-2015, 04:39 PM   #1
sraidr69
Member
 
Registered: Mar 2015
Posts: 59

Rep: Reputation: Disabled
Configuring localhost


I just installed 17.2 and transeffered my websites to /var/www/mysite. In my browser the 192.168.0.10 displays the "Apache2 Ubuntu Default Page" but when I go to "192.168.0.10/mysite" or "192.168.0.10/mysite/login.php" I get...

"Not Found
The requested URL /mysite/login.php was not found on this server."

What do I need to do to get my sites to run?
 
Old 11-24-2015, 07:02 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by sraidr69 View Post
I just installed 17.2
I suppose you mean Mint 17.2, or something else?

Quote:
Originally Posted by sraidr69 View Post
and transeffered my websites to /var/www/mysite. In my browser the 192.168.0.10 displays the "Apache2 Ubuntu Default Page" but when I go to "192.168.0.10/mysite" or "192.168.0.10/mysite/login.php" I get...

"Not Found
The requested URL /mysite/login.php was not found on this server."

What do I need to do to get my sites to run?
In addition to transferring your web site data, consider also transferring its configuration.

You might also want to look at the Apache log files. I can't tell where they are on Debian-based systems; certainly somewhere under /var/log, and probably named access_log and error_log or similar.
 
Old 11-25-2015, 12:15 AM   #3
sraidr69
Member
 
Registered: Mar 2015
Posts: 59

Original Poster
Rep: Reputation: Disabled
These are the last 2 lines, I attempted to access a site and this was what it recorded...

[Tue Nov 24 18:22:37.319917 2015] [mpm_prefork:notice] [pid 2361] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 configured -- resuming normal operations
[Tue Nov 24 18:22:37.379646 2015] [core:notice] [pid 2361] AH00094: Command line: '/usr/sbin/apache2'
 
Old 11-25-2015, 01:41 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by sraidr69 View Post
These are the last 2 lines
The last two lines of what?
 
Old 11-25-2015, 11:26 AM   #5
sraidr69
Member
 
Registered: Mar 2015
Posts: 59

Original Poster
Rep: Reputation: Disabled
Those are the last 2 lines of /var/log/apache2
 
Old 11-25-2015, 11:58 AM   #6
sraidr69
Member
 
Registered: Mar 2015
Posts: 59

Original Poster
Rep: Reputation: Disabled
Again I am running Mint 17.2 that I upgraded from Mint 14. My localhost on 14 was "/var/www". I noticed there is a /var/www/html/ in 17.2 so I moved "mysite" from /www into /www/html and it works and the url is localhost/mysite. I am fine with this, just wondering if anybody knows about this?
 
Old 11-25-2015, 12:13 PM   #7
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
/var/www/html is fine, IF it matches the DocumentRoot directive in the site's .conf file

What does DocumentRoot for the site point to? /var/www/ or /var/www/html/?

Have you tried http://192.168.0.10/html/mysite/?

Last edited by Habitual; 11-25-2015 at 12:15 PM.
 
Old 11-25-2015, 03:55 PM   #8
sraidr69
Member
 
Registered: Mar 2015
Posts: 59

Original Poster
Rep: Reputation: Disabled
I really don't care where it points, this is my dev machine so I am fine with it now that I have it working. Although I mysite is not displaying images or other files that are nested. I tested this by trying to view 192.168.0.9/mysite/images/mypic.jpg and got...

Forbidden
You don't have permission to access /greenstar/images/header_bg.gif on this server.

What is the best way to set permissions for /www/html so that I can create more sites without having to constantly do folder permissions maintenance? I am the only person that uses this machine.
 
Old 11-25-2015, 04:20 PM   #9
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Code:
sudo chown www-data:www-data /var/www/html/ -R

Last edited by Habitual; 11-25-2015 at 04:23 PM.
 
Old 11-25-2015, 04:28 PM   #10
sraidr69
Member
 
Registered: Mar 2015
Posts: 59

Original Poster
Rep: Reputation: Disabled
My sites are now working under localhost but I tried to save an index.html file and got...

Could not save file index.html
Error opening file '/var/www/html/mysite/index.html': Permission denied
 
Old 11-25-2015, 05:29 PM   #11
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
i guess you need to check permissions.

Such as:
Code:
ls -l /var/www/html/mysite
and compare the result with the user account under which you wanted to create the file.

Last edited by berndbausch; 11-25-2015 at 05:30 PM.
 
Old 11-26-2015, 12:46 AM   #12
sraidr69
Member
 
Registered: Mar 2015
Posts: 59

Original Poster
Rep: Reputation: Disabled
sudo: /var/lib/sudo owned by uid 1000, should be uid 0

[sudo] password for bob:
total 336
-rwxrwxr-- 1 www-data www-data 8305 Jan 14 2013 about.html
-rwxrwxr-- 1 www-data www-data 188 May 30 2009 all-free-download.com.url
-rwxrwxr-- 1 www-data www-data 7213 Jan 14 2013 contact.html
drwxrwxr-- 2 www-data www-data 4096 Nov 25 15:17 images
-rwxrwxr-- 1 www-data www-data 8742 Nov 25 15:44 index.html
-rwxrwxr-- 1 www-data www-data 8744 Nov 25 15:23 index.html~
drwxrwxr-- 2 www-data www-data 4096 Nov 25 15:17 js
-rwxrwxr-- 1 www-data www-data 7989 Jan 14 2013 services.html
-rwxrwxr-- 1 www-data www-data 6938 Jan 14 2013 style.css
 
Old 11-26-2015, 12:48 AM   #13
sraidr69
Member
 
Registered: Mar 2015
Posts: 59

Original Poster
Rep: Reputation: Disabled
Since I ran

sudo chown www-data:www-data /var/www/html/ -R

I can no longer view or edit files in /html either!
 
Old 11-26-2015, 07:14 AM   #14
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
As usual, Check the log file /var/log/apache2/error.log for error messages.
 
Old 11-26-2015, 09:22 PM   #15
sraidr69
Member
 
Registered: Mar 2015
Posts: 59

Original Poster
Rep: Reputation: Disabled
This error appears quite a few times and is the only 1 besides shutting down.

[Wed Nov 25 16:02:15.196084 2015] [core:error] [pid 2562] (13)Permission denied: [client 192.168.0.9:32931] AH00035: access to /mysite/login.php denied (filesystem path '/var/www/html/mysite') because search permissions are missing on a component of the path


When I go to my sites I get this again...

Forbidden
You don't have permission to access /me on this server.

And when I try to access the folders I get this...

The folder contents could not be displayed.
You do not have the permissions necessary to view the contents of "mysite"

I have tried setting the www folder permissions as 771 all recursive but it does not seem to be taking (I am using Webmin). How do I set these permissions?
 
  


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
mail received at sendmail has relay=localhost [[UNIX: localhost]] check_rcpt fails chingupt Linux - Distributions 3 04-25-2013 05:36 PM
configuring apache2 for form uploads to be seen at localhost imran042 Linux - Newbie 1 05-01-2012 10:22 AM
Message from syslogd@localhost localhost kernel: Disabling IRQ #21 ylts Linux - Hardware 0 02-26-2005 08:01 AM
"localhost login" problems, loading graphical enterface and configuring static ip june Mandriva 2 10-15-2004 02:46 PM
Configuring Apache for localhost only subnet_rx Linux - Software 1 06-29-2004 05:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:53 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