LinuxQuestions.org
Review your favorite Linux distribution.
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 10-24-2013, 08:44 AM   #16
passinthru
Member
 
Registered: Oct 2013
Location: Mid-Atlantic USA
Distribution: various debians and *buntus
Posts: 51

Rep: Reputation: Disabled

Quote:
Originally Posted by bathory View Post
@passinthru
Take a look here to see what you have to change in your apache configuration when upgrading from 13.04 to 13.10
Is the root problem the upgrade from ubuntu 13.04 to 13.10 and/or apache2.2.22 to apache2.4.6? I have scoured the apache documentation, and done multiple searches for someone with a solution to what is apparently above and beyond my ability to grasp. (And in all of my searching did not come across the site above.) At this point it appears that if I want to get the LAMP stack working under 13.10 I will have to do a fresh install of the os, and then of the LAMP stack, and then either get a masters in computer wizardry or find someone who has put together a how-to similar to the one I have used to make it work (https://help.ubuntu.com/community/ApacheMySQLPHP).

I have apache2.2.22(ubuntu) running under Ubuntu 13.04 and Linuxmint 15 on the same machine as Xubuntu 13.10. I can mount either of these two operating systems, and using midnight commander, compare the /etc/apache2(.2.22) and /etc/apache2(.4.6) directories. I can see the differences. I had already observed the differences, and through the documentation on the apache site and what few things I could find on the web, had already attempted to simply use the 2.2 sites-available file in 2.4. I could not and can not tell what modifications need to be made to make the 2.2 default work under 2.4. I have compared the mods and confs and see some differences, but everything that is enabled under 2.2 is enabled under 2.4. I have even disabled some of the mods and confs and 2.4 that were not enabled in 2.2, and all I can get is "Forbidden". Now the symlink I created in /var/www pointing to what I have under 2.2 as a virtual site is not working. Group and persmission settings appear to be in order... I have no clue.

It does not really matter, it is working under Linuxmint 15 and apache2.2.22(ubuntu). I would just like to know what is going on before that gets upgraded and I am left with nothing.

Sorry for this bit of a rant; I'm grateful to the op for raising the issue (and glad that you got it working), and to those who have attempted to give direction. Realizing that it is open source, free and all of that, someone made the changes and knows the changes they made, and knows the changes that need to be made in order for the thing to work. I wish they would simply document the changes and their implications so that end-dummy-users like me can get it to work. Just my 2c, again with my apologies. Frustrated.
 
Old 10-24-2013, 12:02 PM   #17
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
At this point it appears that if I want to get the LAMP stack working under 13.10 I will have to do a fresh install of the os, and then of the LAMP stack, and then either get a masters in computer wizardry or find someone who has put together a how-to similar to the one I have used to make it work (https://help.ubuntu.com/community/ApacheMySQLPHP).
IMHO you can follow the instructions in the link above, to do the changes in your apache 2.2 config files in order for apache 2.4 to work, without reinstalling the OS.
Most likely you get the "Forbidden" error because you have to change "Allow from all" with "Require all granted" for the directories that are outside the docroot (as OP did).
 
1 members found this post helpful.
Old 10-24-2013, 12:46 PM   #18
passinthru
Member
 
Registered: Oct 2013
Location: Mid-Atlantic USA
Distribution: various debians and *buntus
Posts: 51

Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
IMHO you can follow the instructions in the link above, to do the changes in your apache 2.2 config files in order for apache 2.4 to work, without reinstalling the OS.
Most likely you get the "Forbidden" error because you have to change "Allow from all" with "Require all granted" for the directories that are outside the docroot (as OP did).
Your humble opinion is correct. I considered that I had made the changes exactly as recommended. But apparently, and uncommon to my ordinary practice of making one change at a time, I apparently made one or more other changes in either or both of the apache2.conf, 000-<mysite>.conf, /etc/hosts and groups/persmissions settings which did not make the change from "Allow from all" to "Require all granted" to work. Then when I copied the apache2.2 sites-avaiable/<mysite> file to apache2.4, I neglected to change it as required to work.

For what it might be worth to others who find this thread, and assuming a correctly installed LAMP stack in Xubuntu 13.10, and after checking group and permission settings, I made the following changes: added "ServerName localhost" on a line following "ServerRoot '/etc/apache2'" (line 69) of the apache2.conf file, and my sites-available/000-mysite.conf file is as follows:
Code:
<VirtualHost *:80>
	ServerAdmin webmaster@localhost

	DocumentRoot /home/www
	<Directory />
		Options FollowSymLinks
		AllowOverride None
		Require all granted
	</Directory>
	<Directory /home/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Require all granted
	</Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Require all granted
	</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
</VirtualHost>
This is what straightened it out for me.

Please accept my sincere appreciation for your patience and understanding in helping me get it sorted out, and my apology for any unbecoming words I have said.
 
Old 10-25-2013, 11:19 AM   #19
shams
Member
 
Registered: Jan 2004
Posts: 535

Original Poster
Rep: Reputation: 30
The previous problem was with kubuntu, i just installed the ubuntu 13.10 i got the Forbidden error again in ubuntu i did these steps and it is working now:
Add your documents root dir to the /etc/apache2/apache2.conf mine is:
Quote:
<Directory /home/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
The configuration file for virtual host example.net should be example.net.conf in the /etc/apache2/sites-available directory:
Quote:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/www/example.net/htdocs
ServerName example.net

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>
To enable this virtual host run the a2ensite example.net.conf from the sites-available directory.
Change the permission of the documents root directory to 755 mine is www:
Quote:
chmod -R 0755 www
Restart the apache2:
Quote:
/etc/init.d/apache2 restart
 
  


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
Apache2: Access forbidden! Error 403 vous Linux - Server 4 10-11-2011 04:46 AM
403 forbidden error with apache2 shifter Programming 4 01-22-2010 05:22 AM
403 forbidden error with apache2 shifter Linux - Networking 1 01-20-2010 02:56 PM
apache2 and forbidden error on subdirectories tsimm Linux - Newbie 2 09-05-2004 08:23 AM

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

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