Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 31

Thread: Apache setup problem

  1. #21
    Join Date
    Jul 2008
    Location
    Sandvika, Norway
    Beans
    406
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: Maybe....

    Quote Originally Posted by mbeach View Post
    also, if I understand what you are trying to do - ie test sites internally, I think your httpd.conf file should be empty, ports.conf should have one line "Listen 80", your virtual host files should contain something like:
    Well, with all this messing around it eventually turned out that "listen 80" was in BOTH the ports.conf and the httpd.conf file. I haven't even touched the first one because I would do as few modifications as possible.

    Apache must be a strange program, that doesn't accept such duplicates, and prints error messages that give no clue to what's wrong.

    I haven't tested any more yet. That will have to wait until tomorrow morning.
    If it works, FIX IT! (Bill Gates)


  2. #22
    Join Date
    Jan 2006
    Location
    United Kingdom
    Beans
    2,787
    Distro
    Kubuntu 6.06 Dapper

    Re: Maybe....

    Quote Originally Posted by ingeva View Post
    Well, with all this messing around it eventually turned out that "listen 80" was in BOTH the ports.conf and the httpd.conf file. I haven't even touched the first one because I would do as few modifications as possible.
    This is why you shouldn't 'fight' the modular configuration approach because to do so ends up breaking things. On this note, leave httpd.conf empty - you shouldn't be using it at all (have another read of /etc/apache2/README)

    Apache must be a strange program, that doesn't accept such duplicates, and prints error messages that give no clue to what's wrong.
    It is strange, and for this reason I don't think it will really catch on...

    I haven't tested any more yet. That will have to wait until tomorrow morning.
    Good to hear it - you'll be thankful it's all been so painful as I'm sure you'll find you've learnt far more than if it had 'just worked' the first time around!

    Mathew
    www.NewtonNet.co.uk - Now supporting IPv6!

    ~ Please don't use PM's to request assistance - post your query on the forum and share the discussion - if you've got a problem chances are you won't be the only one! ~

  3. #23
    Join Date
    Jul 2008
    Location
    Sandvika, Norway
    Beans
    406
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: Maybe....

    Quote Originally Posted by MJN View Post
    This is why you shouldn't 'fight' the modular configuration approach because to do so ends up breaking things.
    ...
    Good to hear it - you'll be thankful it's all been so painful as I'm sure you'll find you've learnt far more than if it had 'just worked' the first time around!
    Fighting the modular approach is the last thing I would do, but because of this error everything else I did was in vain. The program didn't even come so far as to read the virtualhosts files.
    I've learn something allright -- what a particular program apache is -- and the documentation doesn't really tell you how to do things.

    It's almost solved now. Apache even reads the correct index files. However, they are all php, and even if I have installed php, apache won't use it.

    Here are my install instructions:
    Code:
    #php5 and apache2
    apt-get install libapache2-mod-php5 php5-common php5
    apt-get install libmysqlclient15off mysql-common
    apt-get install apache2 apache2.2-common apache2-mpm-prefork apache2-utils apache2-doc
    Did I forget something?

    And I would like to ask an additional question: Except rebooting, what can I do to have the hosts-file reread?
    Last edited by ingeva; August 21st, 2008 at 06:05 AM. Reason: typos
    If it works, FIX IT! (Bill Gates)


  4. #24
    Join Date
    Jul 2008
    Location
    Sandvika, Norway
    Beans
    406
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: Apache setup problem

    I see that the thread has been moved. That's OK. I was wondering if I should choose the server platform even if I'm using a desktop.

    Anyway, thanks to everyone for helping.
    However, there's one outstanding question, and I'll be going away for a few days so I hope there will be an answer here by then.
    If it works, FIX IT! (Bill Gates)


  5. #25
    Join Date
    Jan 2006
    Location
    United Kingdom
    Beans
    2,787
    Distro
    Kubuntu 6.06 Dapper

    Re: Maybe....

    Quote Originally Posted by ingeva View Post
    And I would like to ask an additional question: Except rebooting, what can I do to have the hosts-file reread?
    There's no need - just save any edits and they will be available immediately. You may find some applications have their own internal cache so restarting them would be all that's required.

    Mathew
    Last edited by MJN; August 21st, 2008 at 12:33 PM.
    www.NewtonNet.co.uk - Now supporting IPv6!

    ~ Please don't use PM's to request assistance - post your query on the forum and share the discussion - if you've got a problem chances are you won't be the only one! ~

  6. #26
    Join Date
    May 2007
    Location
    Phoenix, Arizona USA
    Beans
    2,909
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Maybe....

    Your box should at least have an internal static IP within your network. when you say the router assigns an addressm this means that your box is set up to pull IPs via DHCP. You don't want to do that in this case.

    -Tim
    www.pcchopshop.net

    Hard to find and obsolete PC and server parts. "If we can't find it, it probably doesn't exist"

  7. #27
    Join Date
    Jul 2008
    Location
    Sandvika, Norway
    Beans
    406
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: Maybe....

    Quote Originally Posted by windependence View Post
    Your box should at least have an internal static IP within your network. when you say the router assigns an addressm this means that your box is set up to pull IPs via DHCP. You don't want to do that in this case.

    -Tim
    I thought so. I'm not sure how I can use static addreses on this box, but I'll check it out. As long at the address can be allocated according to the MAC address and not the physical port, it should be OK.
    If it works, FIX IT! (Bill Gates)


  8. #28
    Join Date
    May 2007
    Location
    Phoenix, Arizona USA
    Beans
    2,909
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Maybe....

    You don't need to worry about the MAC address if you set it static in the machine. Here's how you do it.

    If you want to configure Static IP address you need to edit the /etc/network/interfaces and you need to enter the following lines replace eth0 with your network interface card

    Code:
    sudo nano /etc/network/interfaces
    Code:
    # The primary network interface
    auto eth0
    iface eth0 inet static
    address 192.168.3.90
    gateway 192.168.3.1
    netmask 255.255.255.0
    network 192.168.3.0
    broadcast 192.168.3.255
    Of course you have to replace all the network parameters with your own.

    After entering all the details you need to restart networking services using the following command

    Code:
    sudo /etc/init.d/networking restart
    Then set up your DNS like so:

    Code:
    sudo nano /etc/resolv.conf
    enter the following details

    Code:
    search example.com
    
    nameserver 192.168.3.2
    nameserver 208.67.222.222
    nameserver 208.67.220.220
    You can use these OpenDNS servers or replace them with the ones from your ISP. Either one should work fine.

    -Tim
    www.pcchopshop.net

    Hard to find and obsolete PC and server parts. "If we can't find it, it probably doesn't exist"

  9. #29
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Maybe....

    Quote Originally Posted by ingeva View Post
    ... As long at the address can be allocated according to the MAC address and not the physical port, it should be OK.
    I'm guilty of not reading the entire thread, but the DHCP server should be able to issue a "static lease" based on MAC address - or you can configure a static address on the server (outside the DHCP range, but within the subnet).
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

  10. #30
    Join Date
    Jul 2008
    Location
    Sandvika, Norway
    Beans
    406
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: Maybe....

    Quote Originally Posted by windependence View Post
    You don't need to worry about the MAC address if you set it static in the machine. Here's how you do it.

    Thanks! Here's what I did:

    Code:
    auto wlan0
    iface wlan0 inet static
    address 10.10.10.3
    gateway 10.10.10.1
    netmask 255.255.255.0
    network 10.10.10.0
    broadcast 10.10.10.255
    As you see, I'm using a wireless interface on the current machine.
    After restarting and re-applying the parameters with the Network Manager some more lines were added automatically, and everything works fine.
    If it works, FIX IT! (Bill Gates)


Page 3 of 4 FirstFirst 1234 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •