logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache Configuration Issues
Author
dclarke



Joined: 09 Feb 2016
Posts: 12

PostPosted: Tue 09 Feb '16 22:17    Post subject: Apache Configuration Issues Reply with quote

Hey,

So here is my problem. I am currently trying to install and configure LAMPP on Ubuntu Server 14.04 LTS for the purpose of installing Joomla using this tutorial:

https://docs.joomla.org/Configuring_a_LAMPP_server_for_PHP_development/Linux_desktop

I am able to successfully get to "Creating the New Site" section, specifically where is wants to test the new site by placing a today.php script in the folder then test it by using the web browser. When I try going to localhost/today.php I get the following error:

Forbidden
You don't have permission to access /today.php on this server.
Apache/2.4.7 (Ubuntu) Server at 192.168.200.17 Port 80

I went ahead and followed the rest of the tutorial and thought I would troubleshoot after I was done, so here I am. Can someone help with this issue?

I am also planning on hosting multiple sites/domains from this one Virtual Server so any help on that would be appreciated as well.

Thanks in advance.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Wed 10 Feb '16 19:56    Post subject: Reply with quote

try
instead of
Code:
Order allow,deny
allow from all
use
Code:
Require all granted


instead of
Code:
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
use
Code:
Require local


Order, allow, deny & satisfy were used by Apache prior to 2.4. There is a module (mod_auth_compat) to allow the use of these but in my experience it can have problems if mixed with Apache's new "Require *" only type access control.

see: http://httpd.apache.org/docs/2.4/howto/access.html
Back to top
dclarke



Joined: 09 Feb 2016
Posts: 12

PostPosted: Thu 11 Feb '16 16:27    Post subject: Reply with quote

Hey,

Ok when I do this I can get this to work but only locally. How can we make this work so it can be accessed from anywhere like a real website?

Thanks
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Thu 11 Feb '16 20:38    Post subject: Reply with quote

This is a matter of allowing port 80 through the firewall and also forwarding port 80 through your router to your server's LAN IP address.

Note that some ISPs block port 80.

But for a start, get the port opened in the server. There are two ways it looks on Ubuntu to do this:
https://help.ubuntu.com/lts/serverguide/firewall.html
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-iptables-on-ubuntu-14-04

At this point try to access the server from another computer inside your LAN. If you are successful then it's a matter of forwarding the port through your router. You can find this info usually in the docs that came with your router.
Back to top
dclarke



Joined: 09 Feb 2016
Posts: 12

PostPosted: Thu 11 Feb '16 21:27    Post subject: Reply with quote

Hey, thanks for the reply. I got it working by adding port 80 to the firewall. Thanks for the help on that issue.

Now can we talk about how I can set this machine up for multiple domains on a single IP?

Can someone provide me some details and documentation on how I can complete this. Or even a config I could modify and use on my system?

Thanks
Back to top
dclarke



Joined: 09 Feb 2016
Posts: 12

PostPosted: Fri 12 Feb '16 16:43    Post subject: Reply with quote

BUMP

Can someone please provide details on what file I need to configure to allow multiple domains on a single IP, have seen this documentation:

http://httpd.apache.org/docs/2.4/vhosts/name-based.html

I am just not sure what directory/file I need to change.

Thanks in advance.
Back to top
DnvrSysEngr



Joined: 15 Apr 2012
Posts: 218
Location: Denver, CO USA

PostPosted: Fri 12 Feb '16 17:25    Post subject: Reply with quote

This post should answer all your questions.

http://www.apachelounge.com/viewtopic.php?t=6027&view=previous
Back to top
dclarke



Joined: 09 Feb 2016
Posts: 12

PostPosted: Fri 12 Feb '16 18:43    Post subject: Reply with quote

Hey thanks for the link but that hasn't seemed to help me. I am new to Linux and Apache so this has been a confusing project to say the least. Please bare with me.

Here is how Apache is currently setup on my machine (folder structure wise)

/etc/apache2/ (inside this folder are all the folders listed below plus these files: apache2.conf, envars, magic, ports.conf)

/etc/apache2/conf-available
/etc/apache2/conf-enabled
/etc/apache2/mods-available
/etc/apache2/mods-enabled
/etc/apache2/sites-available
/etc/apache2/sites-enabled

I have created the 3 sites that I would like to host, I have also enabled them in Apache. So where do I create or configure the file for the multiple host? Am I suppose to have a vhost.conf file somewhere? Do I need to enable a mod for Apache that I missed?

Thanks in advance

-daniel
Back to top
DnvrSysEngr



Joined: 15 Apr 2012
Posts: 218
Location: Denver, CO USA

PostPosted: Fri 12 Feb '16 18:58    Post subject: Reply with quote

That is an excellent question. I am way more familiar with Apache in the Windows world than I am in the Linux world.

I bet Gregg or James knows the answer to your question; where the vhost conf file is located at in Apache in the Linux environment.

In the meantime, might this help?

sudo nano /etc/httpd/conf/httpd.conf
Make sure that this line is uncommented (it is located at the very end of the file):

# Virtual hosts
Include conf/extra/httpd-vhosts.conf
You can access your virtual host file within the apache folder:

sudo nano /etc/httpd/conf/extra/httpd-vhosts.conf


-Scott
Back to top
dclarke



Joined: 09 Feb 2016
Posts: 12

PostPosted: Fri 12 Feb '16 19:50    Post subject: Reply with quote

Scott, again thanks for trying to assist me. when I try to run:

sudo nano /etc/httpd/conf/httpd.conf

It prompts me for my password, after I submit my password it opens up a screen shown below:

http://imgur.com/tkoOm4C

Nothing else is in there to uncomment ect...

I feel like I am missing something here... Question

Thanks

-Daniel
Back to top
DnvrSysEngr



Joined: 15 Apr 2012
Posts: 218
Location: Denver, CO USA

PostPosted: Sat 13 Feb '16 0:16    Post subject: Reply with quote

I am going to venture to guess that your httpd.conf file is not in that location.

need to figure out where it is at.
Back to top
DnvrSysEngr



Joined: 15 Apr 2012
Posts: 218
Location: Denver, CO USA

PostPosted: Sat 13 Feb '16 0:18    Post subject: Reply with quote

I found this in regards to httpd.conf on Ubuntu. Way beyond my area of knowledge.

http://askubuntu.com/questions/652095/cant-find-httpd-conf
Back to top


Reply to topic   Topic: Apache Configuration Issues View previous topic :: View next topic
Post new topic   Forum Index -> Apache