Results 1 to 9 of 9

Thread: FreeBSD 6.2 - Installing BASE, WWW issue

  1. #1

    FreeBSD 6.2 - Installing BASE, WWW issue

    Hi,

    I'm a huge BSD guy (been using FreeBSD since 2001, and have FreeBSD, OpenBSD and NetBSD all running on one network aloth with Slackware v11.0)

    I've an issue with FreeBSD 6.2. I'd been running 5.3 for about 2 years and decided to not upgrade, but back up important data, wipe out the v5.3 and install 6.2. It's up and running but I'm having an issue with Apache 2.2. FBSD 6.3 appears to be installing things kinda funky by default. Ports created /usr/local/www/apache22/data as the root directory, but then dumpts web applications in /usr/local/www. So, I've been moving things around the way I prefer.

    What happened was when I moved the directories, the ownership of the directories changed to the user I was using, which was root (and the effect was recursive). Now when I attempt to test the pages, all but the index page shows a 403 code.

    I've installed these tools numerous times in the past (BASE is new to me but it should be almost the same as ACID; phpMyAdmin; Snort Report; Snortsnarf...) without issues but apparently something changed with 6.3 that fscking with my brain.

    If anyone is running an install of FBSD 6.2 or something very close to that version, could you let me know what the default ownership is for the /usr/local/www and /usr/local/www/data directories?

    TIA!

    EDIT -

    No more 403 (had to allow internal traffic to the webserver...had to edit the httpd.conf file). Still have a PHP issue where the server won't serve up rendered PHP files.
    Last edited by NipponDSM; 01-28-2007 at 07:05 AM. Reason: Partial progress made in remediation of issue

  2. #2
    Ever since 4.7, I've completely omitted the data directory. This is why, if you deinstall, and reinstall (you know, if you EVER have a dep problem after cvsuping), it removes that folder. What I ended up doing is this:

    /usr/local/www/site1
    /usr/local/www/site2
    etc etc

    As long as you set it in the conf, you are good to go. Since the changes in 2.0, it should be much easier as well. I also set ownerwnergroup to www:www. Never seems to fail. Chmod your pages accordingly, and you should be good to go. The DocumentRoot should still be defaulted to /usr/local/www hence the reason of nixing ./data .

    As for base, try Barnyard. I've had a lot of luck with it, and liked it a lot more than ACID. On that note, also try out Squil.
    arrogance breeds ignorance

    Screaming Electron, Full of BSD Goodness

  3. #3
    Junior Member tuxette's Avatar
    Join Date
    Jan 2006
    Posts
    60
    Fedora has a php.conf file in /etc/httpd/conf.d with these commands. Do you have something similar in your httpd.conf for handling your PHP?

    Code:
    #
    # PHP is an HTML-embedded scripting language which attempts to make it
    # easy for developers to write dynamically generated webpages.
    #
    
    LoadModule php5_module modules/libphp5.so
    
    #
    # Cause the PHP interpreter to handle files with a .php extension.
    #
    AddHandler php5-script .php
    AddType text/html .php
    
    #
    # Add index.php to the list of files that will be served as directory
    # indexes.
    #
    DirectoryIndex index.php

  4. #4
    The files reflect the same in FBSD, except for the default document root, and the /etc folder for port installs (/usr/local/etc), so he should have it.
    arrogance breeds ignorance

    Screaming Electron, Full of BSD Goodness

  5. #5
    Funny....php5 is installed (so sayeth pkg_info) but there's no php5 module listed in the httpd.conf file or /usr/local/libexec/apache22/. So, I'm currently rebuilding php5 (building by source from ports).

    Quote Originally Posted by tuxette View Post
    Fedora has a php.conf file in /etc/httpd/conf.d with these commands. Do you have something similar in your httpd.conf for handling your PHP?

    Code:
    #
    # PHP is an HTML-embedded scripting language which attempts to make it
    # easy for developers to write dynamically generated webpages.
    #
    
    LoadModule php5_module modules/libphp5.so
    
    #
    # Cause the PHP interpreter to handle files with a .php extension.
    #
    AddHandler php5-script .php
    AddType text/html .php
    
    #
    # Add index.php to the list of files that will be served as directory
    # indexes.
    #
    DirectoryIndex index.php

  6. #6
    OK, I got things working. Thanks for the assistance, guys!

  7. #7
    The modules are not lised in httpd.conf when using 2.x. They are symlinked when enabled. You should see it in the modules-available directory. Glad that you got everything working.
    arrogance breeds ignorance

    Screaming Electron, Full of BSD Goodness

  8. #8
    Quote Originally Posted by Kernel_Killer View Post
    The modules are not lised in httpd.conf when using 2.x. They are symlinked when enabled. You should see it in the modules-available directory. Glad that you got everything working.
    The modules ARE listed in this config and are not listed as symlinks in /usr/local/libexec/apache22.

    Code:
    -su-2.05b# pkg_info | grep apache
    apache-2.2.3        Version 2.2 of Apache web server with prefork MPM.
    Code:
    -su-2.05b# ls -l /usr/local/libexec/apache22/
    total 3492
    -rw-r--r--  1 root  wheel     8904 Jan 27 02:07 httpd.exp
    -rwxr-xr-x  1 root  wheel  2529661 Jan 28 22:14 libphp5.so
    -rwxr-xr-x  1 root  wheel     7913 Jan 27 02:16 mod_actions.so
    -rwxr-xr-x  1 root  wheel    11622 Jan 27 02:16 mod_alias.so
    -rwxr-xr-x  1 root  wheel     7107 Jan 27 02:16 mod_asis.so
    -rwxr-xr-x  1 root  wheel     8817 Jan 27 02:15 mod_auth_basic.so
    -rwxr-xr-x  1 root  wheel    27411 Jan 27 02:15 mod_auth_digest.so
    -rwxr-xr-x  1 root  wheel     7985 Jan 27 02:15 mod_authn_alias.so
    -rwxr-xr-x  1 root  wheel     6890 Jan 27 02:15 mod_authn_anon.so
    -rwxr-xr-x  1 root  wheel     7236 Jan 27 02:15 mod_authn_dbm.so
    -rwxr-xr-x  1 root  wheel     6300 Jan 27 02:15 mod_authn_default.so
    -rwxr-xr-x  1 root  wheel     7227 Jan 27 02:15 mod_authn_file.so
    -rwxr-xr-x  1 root  wheel     8958 Jan 27 02:15 mod_authz_dbm.so
    -rwxr-xr-x  1 root  wheel     6063 Jan 27 02:15 mod_authz_default.so
    -rwxr-xr-x  1 root  wheel     9842 Jan 27 02:15 mod_authz_groupfile.so
    -rwxr-xr-x  1 root  wheel     8692 Jan 27 02:15 mod_authz_host.so
    -rwxr-xr-x  1 root  wheel     7953 Jan 27 02:15 mod_authz_owner.so
    -rwxr-xr-x  1 root  wheel     6758 Jan 27 02:15 mod_authz_user.so
    -rwxr-xr-x  1 root  wheel    32077 Jan 27 02:16 mod_autoindex.so
    -rwxr-xr-x  1 root  wheel    32029 Jan 27 02:15 mod_cache.so
    -rwxr-xr-x  1 root  wheel     8853 Jan 27 02:15 mod_cern_meta.so
    -rwxr-xr-x  1 root  wheel    23877 Jan 27 02:16 mod_cgi.so
    -rwxr-xr-x  1 root  wheel    15383 Jan 27 02:15 mod_charset_lite.so
    -rwxr-xr-x  1 root  wheel    83146 Jan 27 02:16 mod_dav.so
    -rwxr-xr-x  1 root  wheel    43569 Jan 27 02:16 mod_dav_fs.so
    -rwxr-xr-x  1 root  wheel    17684 Jan 27 02:15 mod_deflate.so
    -rwxr-xr-x  1 root  wheel     7832 Jan 27 02:16 mod_dir.so
    -rwxr-xr-x  1 root  wheel    19039 Jan 27 02:15 mod_disk_cache.so
    -rwxr-xr-x  1 root  wheel     7266 Jan 27 02:15 mod_env.so
    -rwxr-xr-x  1 root  wheel    10622 Jan 27 02:15 mod_expires.so
    -rwxr-xr-x  1 root  wheel    10738 Jan 27 02:15 mod_file_cache.so
    -rwxr-xr-x  1 root  wheel    14699 Jan 27 02:15 mod_filter.so
    -rwxr-xr-x  1 root  wheel    14666 Jan 27 02:16 mod_headers.so
    -rwxr-xr-x  1 root  wheel    14300 Jan 27 02:16 mod_imagemap.so
    -rwxr-xr-x  1 root  wheel    39609 Jan 27 02:15 mod_include.so
    -rwxr-xr-x  1 root  wheel    19261 Jan 27 02:16 mod_info.so
    -rwxr-xr-x  1 root  wheel    22793 Jan 27 02:15 mod_log_config.so
    -rwxr-xr-x  1 root  wheel     8107 Jan 27 02:15 mod_logio.so
    -rwxr-xr-x  1 root  wheel    15979 Jan 27 02:16 mod_mime.so
    -rwxr-xr-x  1 root  wheel    23336 Jan 27 02:15 mod_mime_magic.so
    -rwxr-xr-x  1 root  wheel    31548 Jan 27 02:16 mod_negotiation.so
    -rwxr-xr-x  1 root  wheel    60651 Jan 27 02:16 mod_rewrite.so
    -rwxr-xr-x  1 root  wheel    11167 Jan 27 02:16 mod_setenvif.so
    -rwxr-xr-x  1 root  wheel    12518 Jan 27 02:16 mod_speling.so
    -rwxr-xr-x  1 root  wheel   147416 Jan 27 02:16 mod_ssl.so
    -rwxr-xr-x  1 root  wheel    19987 Jan 27 02:16 mod_status.so
    -rwxr-xr-x  1 root  wheel     9051 Jan 27 02:16 mod_unique_id.so
    -rwxr-xr-x  1 root  wheel     8557 Jan 27 02:16 mod_userdir.so
    -rwxr-xr-x  1 root  wheel    11047 Jan 27 02:16 mod_usertrack.so
    -rwxr-xr-x  1 root  wheel     7635 Jan 27 02:16 mod_version.so
    -rwxr-xr-x  1 root  wheel     9912 Jan 27 02:16 mod_vhost_alias.so
    httpd.conf:

    Code:
    # To be able to use the functionality of a module which was built as a DSO you
    # have to place corresponding `LoadModule' lines at this location so the
    # directives contained in it are actually available _before_ they are used.
    # Statically compiled modules (those listed by `httpd -l') do not need
    # to be loaded here.
    #
    # Example:
    # LoadModule foo_module modules/mod_foo.so
    #
    LoadModule authn_file_module libexec/apache22/mod_authn_file.so
    LoadModule authn_dbm_module libexec/apache22/mod_authn_dbm.so
    LoadModule authn_anon_module libexec/apache22/mod_authn_anon.so
    LoadModule authn_default_module libexec/apache22/mod_authn_default.so
    LoadModule authn_alias_module libexec/apache22/mod_authn_alias.so
    LoadModule authz_host_module libexec/apache22/mod_authz_host.so
    LoadModule authz_groupfile_module libexec/apache22/mod_authz_groupfile.so
    LoadModule authz_user_module libexec/apache22/mod_authz_user.so
    LoadModule authz_dbm_module libexec/apache22/mod_authz_dbm.so
    LoadModule authz_owner_module libexec/apache22/mod_authz_owner.so
    LoadModule authz_default_module libexec/apache22/mod_authz_default.so
    LoadModule auth_basic_module libexec/apache22/mod_auth_basic.so
    LoadModule auth_digest_module libexec/apache22/mod_auth_digest.so
    LoadModule file_cache_module libexec/apache22/mod_file_cache.so
    LoadModule cache_module libexec/apache22/mod_cache.so
    LoadModule disk_cache_module libexec/apache22/mod_disk_cache.so
    LoadModule include_module libexec/apache22/mod_include.so
    ...
    ...
    Keep in mind, I'm not looking to set up a perfect web server, so I'm not looking to dot my 'i's and cross my 't's...just trying to get it up and running at this point.

  9. #9
    Yeah, that's understandable. I figured FBSD would have inhierited the symlinks, but I guess not. I think that's been a great improvement, at least on the Linux side. I thought my FBSD Apache was doing the same, but it seems I'm sadly mistaken. After I'm done upgrading from my make buildworld and installworld, I'll install it again in case you need any more help with this.
    arrogance breeds ignorance

    Screaming Electron, Full of BSD Goodness

Similar Threads

  1. Installing FreeBSD 6.2
    By peter in forum Tutorials
    Replies: 0
    Last Post: 11-24-2008, 01:34 AM
  2. FreeBSD Installing Stuff.
    By shebang in forum BSD
    Replies: 20
    Last Post: 12-26-2006, 09:11 PM
  3. Knowledge Base
    By trickster in forum Announcements and Suggestions
    Replies: 23
    Last Post: 04-15-2003, 02:39 AM
  4. Problem #2:perl-base >= 5.600-29mdk errors (RPM issue)
    By Gahwani in forum Linux - General Topics
    Replies: 2
    Last Post: 10-09-2002, 04:43 AM
  5. Replies: 18
    Last Post: 08-07-2002, 12:43 PM

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
  •