Home Web Server

Where Penguins and Daemons chill together in the warmth of the Sun.

Moderators: SecretSquirrel, notfred

Postposted on Wed Oct 10, 2007 11:03 am

just brew it! wrote:Ahh, OK. Didn't realize your distro renamed the Apache process... the canonical name for the server process is httpd.
Gah! That's ridiculous.
...
mattsteg
Gerbil God
 
Posts: 15752
Joined: Thu Dec 27, 2001 7:00 pm
Location: Applauding the new/old variable width forums

Postposted on Wed Oct 10, 2007 11:18 am

just brew it! wrote:Ahh, OK. Didn't realize your distro renamed the Apache process... the canonical name for the server process is httpd

Actually, jbi, it's Red Hat that renames it to httpd. Almost all of the others (Debian-derived, Gentoo, etc.) will have it as apache2.
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 4:39 pm
Location: Mountain View, CA

Postposted on Wed Oct 10, 2007 11:20 am

bitvector wrote:
just brew it! wrote:Ahh, OK. Didn't realize your distro renamed the Apache process... the canonical name for the server process is httpd

Actually, jbi, it's Red Hat that renames it to httpd. Almost all of the others (Debian-derived, Gentoo, etc.) will have it as apache2.
How can red hat rename httpd to httpd? It's already named that!
...
mattsteg
Gerbil God
 
Posts: 15752
Joined: Thu Dec 27, 2001 7:00 pm
Location: Applauding the new/old variable width forums

Postposted on Wed Oct 10, 2007 11:32 am

mattsteg wrote:How can red hat rename httpd to httpd? It's already named that!

I forgot the apache source builds as httpd unmodified (so probably Slackware and the BSDs will also have it as httpd). :oops:

What's odd about Red Hat's packaging is that they actually call the package httpd. So if you want to install apache, you install the httpd package. Since there are other httpd's, many distros pass the configure option (--with-program-name=apache2 or some variation) to make it less generic than the default.
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 4:39 pm
Location: Mountain View, CA

Postposted on Wed Oct 10, 2007 11:38 am

...and IMO lack of consistency like this is one of the things that scares a lot of people away from Linux.
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 37635
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Postposted on Wed Oct 10, 2007 11:39 am

bitvector wrote:
mattsteg wrote:How can red hat rename httpd to httpd? It's already named that!

I forgot the apache source builds as httpd unmodified (so probably Slackware and the BSDs will also have it as httpd). :oops:

What's odd about Red Hat's packaging is that they actually call the package httpd. So if you want to install apache, you install the httpd package. Since there are other httpd's, many distros pass the configure option (--with-program-name=apache2 or some variation) to make it less generic than the default.
My strong preference is that executables not be renamed. It leads to crap confusion like this (although it's perhaps sorta understandable in this case). What's wrong with only renaming the package and leaving the filenames intact to the maximum degree possible. At least they could include the original name so that grep etc. would find the right process when searching for it.

You'd think they could at least have the sense to call it apache2-httpd or something.
...
mattsteg
Gerbil God
 
Posts: 15752
Joined: Thu Dec 27, 2001 7:00 pm
Location: Applauding the new/old variable width forums

Postposted on Wed Oct 10, 2007 12:18 pm

mattsteg wrote:
bitvector wrote:
mattsteg wrote:How can red hat rename httpd to httpd? It's already named that!

I forgot the apache source builds as httpd unmodified (so probably Slackware and the BSDs will also have it as httpd). :oops:

What's odd about Red Hat's packaging is that they actually call the package httpd. So if you want to install apache, you install the httpd package. Since there are other httpd's, many distros pass the configure option (--with-program-name=apache2 or some variation) to make it less generic than the default.
My strong preference is that executables not be renamed. It leads to crap confusion like this (although it's perhaps sorta understandable in this case). What's wrong with only renaming the package and leaving the filenames intact to the maximum degree possible. At least they could include the original name so that grep etc. would find the right process when searching for it.

You'd think they could at least have the sense to call it apache2-httpd or something.


Distro's aren't the only one guilty of this, but individual programs as well. I've had to look through the emerge output to see what program name I'm supposed to type at the command line to get Program X to run. For instance, to get abcde to run, I type abcde, but there are some out there that what you type at the line is not what the program is called. I can't think of any examples right now. It's a repressed memory of traumatic experiences.


Anyway, back on topic: I've tried disabling SSL through the configuration files and no dice. So now I'm re-emerge-ing Apache with "-ssl" added to my use flags in make.conf. We'll see if that does the trick.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Postposted on Wed Oct 10, 2007 12:20 pm

just brew it! wrote:...and IMO lack of consistency like this is one of the things that scares a lot of people away from Linux.

Well, there is a lack of consistency between distros, but apache is somewhat of an exceptional case in inconsistency. Just look at this list of default layouts for different distros and operating systems: http://wiki.apache.org/httpd/DistrosDefaultLayout

Oy!

Edit:
mattsteg wrote:You'd think they could at least have the sense to call it apache2-httpd or something.

That sounds like a good, sane compromise... which is why the Debian devels would never stand for it.
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 4:39 pm
Location: Mountain View, CA

Postposted on Wed Oct 10, 2007 1:50 pm

titan wrote:Distro's aren't the only one guilty of this, but individual programs as well.
At least with programs it's "supposed" to be that way, even if it's a crappy practice. My beef is that you should be able to use the applications docs for as much as possible if needed, and changing names etc. really gets in the way of that.
...
mattsteg
Gerbil God
 
Posts: 15752
Joined: Thu Dec 27, 2001 7:00 pm
Location: Applauding the new/old variable width forums

Postposted on Wed Oct 10, 2007 4:21 pm

Alright, it still isn't working. :evil: I've commented out the line for vhosts, so this should be the only file to configure. Right now, when I type 192.168.1.4 into the address bar, Firefox reports that it's waiting and waits indefinitely. The logs aren't particularly enlightening. Scratch that. Just checked again and it shows a blank page now. Guess I have to wait for the digest. But, even that isn't right. It's blank even when I go to 192.168.1.4/index.html

/etc/apache2/httpd.conf
Code: Select all
# This is a modification of the default Apache 2.2 configuration file
# for Gentoo Linux.
#
# Support:
#   http://www.gentoo.org/main/en/lists.xml   [mailing lists]
#   http://forums.gentoo.org/                 [web forums]
#   irc://irc.freenode.net#gentoo-apache      [irc chat]
#
# Bug Reports:
#   http://bugs.gentoo.org                    [gentoo related bugs]
#   http://httpd.apache.org/bug_report.html   [apache httpd related bugs]
#
#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "var/log/apache2/foo.log"
# with ServerRoot set to "/usr" will be interpreted by the
# server as "/usr/var/log/apache2/foo.log".

# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to point the LockFile directive
# at a local disk.  If you wish to share the same ServerRoot for multiple
# httpd daemons, you will need to change at least LockFile and PidFile.
ServerRoot "/usr/lib/apache2"

# Dynamic Shared Object (DSO) Support
#
# 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
#
# GENTOO: Automatically defined based on apache2-builtin-mods at compile time
#
# The following modules are considered as the default configuration.
# If you wish to disable one of them, you may have to alter other
# configuration directives.
#
# Change these at your own risk!

LoadModule userdir_module modules/mod_userdir.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbd_module modules/mod_authn_dbd.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
<IfDefine CACHE>
LoadModule cache_module modules/mod_cache.so
</IfDefine>
LoadModule cgi_module modules/mod_cgi.so
<IfDefine DAV>
LoadModule dav_module modules/mod_dav.so
</IfDefine>
<IfDefine DAV>
LoadModule dav_fs_module modules/mod_dav_fs.so
</IfDefine>
<IfDefine DAV>
LoadModule dav_lock_module modules/mod_dav_lock.so
</IfDefine>
LoadModule dbd_module modules/mod_dbd.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule dir_module modules/mod_dir.so
<IfDefine CACHE>
LoadModule disk_cache_module modules/mod_disk_cache.so
</IfDefine>
LoadModule env_module modules/mod_env.so
LoadModule expires_module modules/mod_expires.so
LoadModule ext_filter_module modules/mod_ext_filter.so
<IfDefine CACHE>
LoadModule file_cache_module modules/mod_file_cache.so
</IfDefine>
LoadModule filter_module modules/mod_filter.so
LoadModule headers_module modules/mod_headers.so
LoadModule ident_module modules/mod_ident.so
LoadModule imagemap_module modules/mod_imagemap.so
LoadModule include_module modules/mod_include.so
<IfDefine INFO>
LoadModule info_module modules/mod_info.so
</IfDefine>
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
<IfDefine CACHE>
LoadModule mem_cache_module modules/mod_mem_cache.so
</IfDefine>
LoadModule mime_module modules/mod_mime.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule negotiation_module modules/mod_negotiation.so
<IfDefine PROXY>
LoadModule proxy_module modules/mod_proxy.so
</IfDefine>
<IfDefine PROXY>
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
</IfDefine>
<IfDefine PROXY>
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
</IfDefine>
<IfDefine PROXY>
LoadModule proxy_connect_module modules/mod_proxy_connect.so
</IfDefine>
<IfDefine PROXY>
LoadModule proxy_http_module modules/mod_proxy_http.so
</IfDefine>
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule speling_module modules/mod_speling.so
<IfDefine SSL>
LoadModule ssl_module modules/mod_ssl.so
</IfDefine>
<IfDefine INFO>
LoadModule status_module modules/mod_status.so
</IfDefine>
<IfDefine SUEXEC>
LoadModule suexec_module modules/mod_suexec.so
</IfDefine>
LoadModule unique_id_module modules/mod_unique_id.so
<IfDefine USERDIR>
LoadModule userdir_module modules/mod_userdir.so
</IfDefine>
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so

# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
User apache
Group apache

# Supplemental configuration
#
# Most of the configuration files in the /etc/apache2/modules.d/ directory can
# be turned on using APACHE2_OPTS in /etc/conf.d/apache2 to add extra features
# or to modify the default configuration of the server.
#
# To know which flag to add to APACHE2_OPTS, look at the first line of the
# the file, which will usually be an <IfDefine OPTION> where OPTIONS is the
# flag to use.
Include /etc/apache2/modules.d/*.conf

# Virtual-host support
#
# Gentoo has made using virtual-hosts easy. In /etc/apache2/vhosts.d/ we
# include a default vhost (enabled by adding -D DEFAULT_VHOST to
# APACHE2_OPTS in /etc/conf.d/apache2).
Include /etc/apache2/vhosts.d/*.conf

# vim: ts=4 filetype=apache

#Name of host
ServerName 192.168.1.4:80
SSLDisable
#Protect / from everyone and .htaccess
UserDir disabled root
<Directory />
 Order Deny,Allow
 Deny from all
 AllowOverride None
</Directory>

DocumentRoot "/home/media/www"
DirectoryIndex "index.html"

#Allow access to www
<Directory "/home/media/www">
Order Deny,Allow
Allow from all
</Directory>
<Directory "/home/media/pub">
Order Deny,Allow
Allow from all
</Directory>

#<VirtualHost 192.168.1.4:80>
#ServerName 192.168.1.4:80
#DocumentRoot "/home/media/www"
#CustomLog logs/mydomain_access_log combined
#ErrorLog logs/mydomain_error_log
#ErrorDocument 401 /auth.html
#</VirtualHost>


/etc/conf.d/apache2
Code: Select all
# /etc/conf.d/apache2: config file for /etc/init.d/apache2

# When you install a module it is easy to activate or deactivate the modules
# and other features of apache using the APACHE2_OPTS line. Every module should
# install a configuration in /etc/apache2/modules.d. In that file will be an
# <IfDefine NNN> where NNN is the option to enable that module.
# Here are the options available in the default configuration:
#
#  CACHE      Enables mod_cache
#  MEM_CACHE  Enables default configuration mod_mem_cache
#  DAV        Enables mod_dav
#  DEFAULT_VHOST   Enables name-based virtual hosts, with the default
#                  virtual host being in /var/www/localhost/htdocs
#  ERRORDOCS  Enables default error documents for many languages.
#  INFO       Enables mod_info, a useful module for debugging
#  LANGUAGE   Enables content-negotiation based on language and charset.
#  LDAP       Enables mod_ldap (available if USE=ldap)
#  AUTH_LDAP  Enables authentication through mod_ldap (available if USE=ldap)
#  MANUAL     Enables /manual/ to be the apache manual (available if USE=docs)
#  PROXY      Enables mod_proxy
#  SSL        Enables SSL (available if USE=ssl)
#  SSL_DEFAULT_VHOST   Enables default vhost for SSL (you should enable this
#                      when you enable SSL unless you know what you are doing)
#  SUEXEC     Enables running CGI scripts (in USERDIR) through suexec.
#  USERDIR    Enables /~username mapping to /home/username/public_html
#
# Warning: You need one of DEFAULT_VHOST or SSL_DEFAULT_VHOST, otherwise apache
#          will not listen for incomming connections on any port.
#The following line was the original default
#APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE -D MANUAL -D SUEXEC"
APACHE2_OPTS="-D INFO -D LANGUAGE -D MANUAL -D SUEXEC"
# Extended options for advanced uses of Apache ONLY
# You don't need to edit these unless you are doing crazy Apache stuff
# As not having them set correctly, or feeding in an incorrect configuration
# via them will result in Apache failing to start
# YOU HAVE BEEN WARNED.

# ServerRoot setting
SERVERROOT=/usr/lib/apache2

# Configuration file location
# - If this does NOT start with a '/', then it is treated relative to
# $SERVERROOT by Apache
CONFIGFILE=/etc/apache2/httpd.conf

# Location to log startup errors to
# They are normally dumped to your terminal.
STARTUPERRORLOG="/var/log/apache2/startuperror.log"

# A command that outputs a formatted text version of the HTML at the URL
# of the command line. Designed for lynx, however other programs may work.
#LYNX="lynx -dump"

# The URL to your server's mod_status status page.
# Required for status and fullstatus
STATUSURL="http://localhost/server-status"

# Method to use when reloading the server
# Valid options are 'restart' and 'graceful'
# See http://httpd.apache.org/docs/2.2/stopping.html for information on
# what they do and how they differ.
RELOAD_TYPE="restart"


/var/log/apache2/error_log
Code: Select all
[Wed Oct 10 16:09:32 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Oct 10 16:09:33 2007] [notice] Digest: generating secret for digest authentication ...
[Wed Oct 10 16:11:25 2007] [notice] Digest: done
[Wed Oct 10 16:11:26 2007] [notice] Apache/2.2.6 (Unix) configured -- resuming normal operations


/var/log/apache2/access_log
Code: Select all
192.168.1.2 - - [10/Oct/2007:16:11:26 -0500] "GET / HTTP/1.1" 200 -
192.168.1.2 - - [10/Oct/2007:16:18:11 -0500] "GET / HTTP/1.1" 200 -
192.168.1.2 - - [10/Oct/2007:16:19:59 -0500] "GET /index.html HTTP/1.1" 200 -
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Postposted on Thu Oct 11, 2007 8:24 am

It seems to me that Apache isn't sending the file. Looking through the access log, I see a lot of "GET" requests, but no response to those request. I've added a couple things to the httpd.conf. One was to eliminate the favicon.ico error from the error log, and a "EnableSendfile Off". Or whatever that command is supposed to be. It got me thinking, is there something that should be enabled in the kernel? I run a pretty minimal, monolithic kernel. I avoid modules when I can, and with this build there are no kernel modules.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Postposted on Thu Oct 11, 2007 1:19 pm

Now I feel dumb, but kind of smart.

It turns out that Apache was trying to send the file, but index.html was empty. That's right, the file was created, but somehow my HTML code wasn't saved in it. On top of that, Apache wants all the files to be executable. A "chmod 775 index.html" command did the trick.

I found the problem when I tried a different web server, thttpd. Thttpd, however, doesn't require the files to be executable. I think I'll stick with Apache, though, since the syntax for thttpd is a bit tough to follow.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Postposted on Thu Oct 11, 2007 9:16 pm

Apache shouldn't need the files executable, just readable by the user that the apache process (whatever it is called :wink: ) is running as. The directory typically needs the execute flag on because on directories that doesn't mean execute but instead allows you to list the directory (if I remember correctly).
notfred
Grand Gerbil Poohbah
 
Posts: 3726
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Postposted on Thu Oct 11, 2007 9:31 pm

notfred wrote:Apache shouldn't need the files executable, just readable by the user that the apache process (whatever it is called :wink: ) is running as. The directory typically needs the execute flag on because on directories that doesn't mean execute but instead allows you to list the directory (if I remember correctly).

Close. The "execute" bit when applied to a directory allows you to traverse the directory when attempting to open a file or access a lower level directory, but does not allow the contents of the directory to be directly viewed. The "read" bit allows the names of files in the directory to be listed, but does not allow the files to be opened.
Last edited by just brew it! on Thu Oct 11, 2007 9:35 pm, edited 1 time in total.
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 37635
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Postposted on Thu Oct 11, 2007 9:32 pm

notfred wrote:The directory typically needs the execute flag on because on directories that doesn't mean execute but instead allows you to list the directory (if I remember correctly).

Actually read allows you to list the contents of a directory, execute allows you to "enter" it (cd into it, reach paths contained within it, etc.). I have public directories with og-r but og+x so people can access files that they know the exact path to (but not get a directory listing).

Edit: jbi beat me this time :lol:
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 4:39 pm
Location: Mountain View, CA

Postposted on Thu Oct 11, 2007 9:37 pm

bitvector wrote:Edit: jbi beat me this time :lol:

Heh... but you beat me to my attempted ninja edit where I clarified the difference between the read and execute bits! :lol:

(Geeky *NIX minutiae FTW! :D)
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 37635
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Postposted on Thu Oct 11, 2007 9:45 pm

...and my referring to them as "bits" (instead of "flags" or "attributes") shows my age, I guess. The original AT&T UNIX filesystem stored file permissions in 9 bits of a single 16-bit word, and this convention is still carried forward in the major contemporary *NIX filesystems. This is why you sometimes see file permissions expressed in octal notation -- e.g. 754 corresponds to rwxr-xr--, or "full permissions for owner, read/execute for group, and read only for everyone else".
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 37635
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Postposted on Fri Oct 12, 2007 2:00 am

Well, there seems to be an extra bit of information in there that gets overwritten or something because when I remove the execute permissions, chmod -R a-x *, I can no longer see the files on my Windows machine. Obviously, Samba is being used. Is that something to do with the directories losing their executableness?

Otherwise, yeah, the files don't actually need to be executable for Apache to serve them up.

On a side note, I was totally tempted to run with a light weight web server like Boa, lighttpd, or thttpd. Thing is, they have horrible documentation, if any. On top of that, some haven't been updated in years.

Now, on to the next thing. How do I make it so my grandma can make postings? She's not that tech savvy, but she knows how to email and surf the web, so I'm guessing she knows how to enter text in the appropriate spot, but I doubt she has the prowess to edit HTML files and FTP them to my server. What am I looking at doing here?
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Postposted on Fri Oct 12, 2007 2:05 am

Wordpress is a really simple blog application. Do you want something like that or something simpler?
Usacomp2k3
Gerbil God
 
Posts: 21291
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL

Postposted on Fri Oct 12, 2007 2:35 am

titan wrote:Is that something to do with the directories losing their executableness?

Well, you can't "get into" a directory if it's not executable, which means you can't get to the files or subdirectories below it. You could do:
Code: Select all
find . -type f -print0 | xargs -0 chmod a-x
in the top-level directory. That'll remove execute from the files and not the directories.
Code: Select all
find . -type d -print0 | xargs -0 chmod a+x
Will put back the execute for dirs. find enumerates recursively starting at the path given.

titan wrote:On a side note, I was totally tempted to run with a light weight web server like Boa, lighttpd, or thttpd. Thing is, they have horrible documentation, if any. On top of that, some haven't been updated in years.

Lighttpd is actively maintained and pretty good. I tend to prefer it to apache for simpler stuff. Look on the lighttpd wiki for configuration info (not the documentation link) - it's pretty good info for basic setup.

titan wrote:Now, on to the next thing. How do I make it so my grandma can make postings?

I'd still say this is a good use-case for a wiki -- one with a simple word-like GUI editor (like MoinMoin).
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 4:39 pm
Location: Mountain View, CA

Postposted on Fri Oct 12, 2007 10:02 am

Well, guys. I think I'd like to do both WordPress and MoinMoin. They both look like the solutions I'm looking for. MoinMoin would be great for the Christmas lists, addresses, and the sort. WordPress would be great for people to general "updates" kind of posts. It looks like it has a comment system too, which would be great. And on top of that, they both look like they're highly configurable. I'll be able to give them holiday looks. :D
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Postposted on Fri Oct 12, 2007 11:50 am

Thanks JBI and bitvector. I knew directories were funny and didn't have time to check, guess my memory was in the right direction but not perfect.
notfred
Grand Gerbil Poohbah
 
Posts: 3726
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Postposted on Fri Oct 12, 2007 12:40 pm

notfred wrote:Thanks JBI and bitvector. I knew directories were funny and didn't have time to check, guess my memory was in the right direction but not perfect.


That reminds me, thanks guys. That cleared up my understanding and now everything is as it should be.

It also explains why I wasn't able to enter directories that were created via FTP. Adding "Umask 0002" within the directory tags fixed that problem.

Also, thanks bitvector for those commands. I am constantly surprised at Linux's ability to do complex tasks with relatively simple commands.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Postposted on Fri Oct 12, 2007 1:47 pm

titan wrote:I am constantly surprised at Linux's ability to do complex tasks with relatively simple commands.

This is a major difference between the Unix (which Linux is a variety of) and Microsoft mindset.

In the Unix world there are a number of simple tools that do one simple task and do it well e.g. "find" finds stuff, "chmod" changes file modes (permissions) and "xargs" deals with the arguments of a command. Given these simple tools, you can build very powerful things by stringing them together. However for a novice if an application doesn't exist stringing these together in the way they need, working out how to string the tools together can be intimidating, "man" and especially "man -k" plus Google searches help.

In the Microsoft world, there are complete applications e.g. for finding and changing the permissions of files. This breaks down as soon as you want to do something that the application doesn't quite achieve e.g. changing the name as well as the mode - you have to write a whole new application.

One other thing on the Unix way of doing things - there are normally many ways of doing the same thing. As an example, rather than
Code: Select all
find . -type f -print0 | xargs -0 chmod a-x
I would use
Code: Select all
find . -type f -exec chmod a-x \{\} \;
from personal preference.
notfred
Grand Gerbil Poohbah
 
Posts: 3726
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Postposted on Fri Oct 12, 2007 2:32 pm

titan wrote:I am constantly surprised at Linux's ability to do complex tasks with relatively simple commands.

Yes, that is one of the greatest strengths of the *NIX way of doing things. Lots of simple tools which can be combined in a near-infinite variety of ways to accomplish practically any task. Add to this the fact that nearly every aspect of system operation is controlled at some level either by shell scripts or text-based configuration files, and you have a lot of power and flexibility.
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 37635
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Postposted on Sat Oct 13, 2007 11:30 am

Just when I thought Apache was good to go another problem crops up. So, accessing the website over the LAN works fine, but when trying to access it over the Internet doesn't work.

Firefox displays:
The connection was reset
The connection to the server was reset while the page was loading.
* The site could be temporarily unavailable or too busy. Try again in a few moments.
* If you are unable to load any pages, check your computer's network connection.
* If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.


Internet Explorer displays:
Internet Explorer cannot display the webpage

Most likely causes:
You are not connected to the Internet.
The website is encountering problems.
There might be a typing error in the address.

What you can try:
Diagnose Connection Problems

More information

This problem can be caused by a variety of issues, including:

Internet connectivity has been lost.
The website is temporarily unavailable.
The Domain Name Server (DNS) is not reachable.
The Domain Name Server (DNS) does not have a listing for the website's domain.
If this is an HTTPS (secure) address, click Tools, click Internet Options, click Advanced, and check to be sure the SSL and TLS protocols are enabled under the security section.


The browsers show that they're connecting, but they wait for a response and get nothing. Do I need to do more with my router than to forward port 80 to the server?
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Postposted on Sat Oct 13, 2007 11:34 am

You most likely need to set servername to something sensible.
...
mattsteg
Gerbil God
 
Posts: 15752
Joined: Thu Dec 27, 2001 7:00 pm
Location: Applauding the new/old variable width forums

Postposted on Sat Oct 13, 2007 12:10 pm

Check the Apache logs, I bet you are not even seeing the connection come in. You probably don't have the port 80 forwarding quite correct on your router.
notfred
Grand Gerbil Poohbah
 
Posts: 3726
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Postposted on Sat Oct 13, 2007 2:17 pm

Make sure you get some good plugins for Wordpress. Here's what I have on mine:
aksimet (spam comment prevention. A livesaver)
bbcode (if you use them here on TR, it's helpful to be able to use them there too
brian's threaded comments (threaded comments are the best)
Instant Upgrade (makes upgraded to new versions painless. You hit a button and it is done)
yahoo/msn style smilies (self-explanatory)
Usacomp2k3
Gerbil God
 
Posts: 21291
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL

Postposted on Sat Oct 13, 2007 10:44 pm

I have "ServerName" set to the IP address that I've been given by the ISP's DHCP server. That was the first solution I tried, but have no idea how to proceed from there. What would be more sensible than that?

Port forwarding is pretty straightforward on my router. Select the port to open for the corresponding computer. So, port 80 has been forwarded to 192.168.1.4 in the same manner as my FTP and SSH ports, which work fine.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

PreviousNext

Return to Linux, Unix, and Assorted Madness

Who is online

Users browsing this forum: No registered users and 1 guest