LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-17-2012, 05:48 PM   #16
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422

I'd be real tempted to have a good read through Apache's log files. Make sure Apache is working correctly and then diagnose the LAN issues.
 
Old 09-17-2012, 08:23 PM   #17
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,366
Blog Entries: 28

Rep: Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162
If you have a business class account, you should specify that (have the account number handy) when you call support. Business support is normally separate from home user support.

You should be able to tell very quickly from your bill whether it's business class or not.
 
Old 09-17-2012, 11:11 PM   #18
youcantoo_linuxguy
LQ Newbie
 
Registered: Oct 2006
Location: Lebanon, OR
Distribution: PCLinuxOS
Posts: 21

Rep: Reputation: 0
Quote:
Originally Posted by R3nCi View Post
Yes, the terms of service in my area do have an identical prohibition of servers. However, I am fairly sure that I am working with a business-class plan, as the service was purchased for use in a home office with multiple coworkers by my father. As I previously mentioned,





I'll consult Cox re the dedicated IP question when I can. That's an interesting tidbit.

I still haven't figured out why I suddenly cannot access the server within the network which the server is connected to. That issue only surfaced on Sunday morning, but I do not have physical access to the server and will not until Tuesday evening. Once I return, I will begin working to establish the cause of that problem. Until then, anyone with further thoughts: chime in!
So are you using a dedicated (static) IP or is it dynamic ??? If it is dynamic there is a possibility that your IP address has changed so the IP you used before to access it is no longer viable. Try accessing your web server using http://localhost. What happens, do you see your web page???

As for changing the port that Apache listens to you will need to modify your httpd.conf file. Look for the Listen directive. Example:

# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80 <--- ONLY USE THIS IF YOU HAVE A SINGLE STATIC IP
Listen *:80
Listen *:443

in my system I listen to any IP address on both ports 80 and 443 (SSL) to change it you would change that Listen line to say something like

Listen *:8080

restart your webserver (service httpd restart) and now it will listen to any IP address on Port 8080. NOTE you will have to be the root user to make changes to the httpd.conf file and to restart the httpd service.
 
Old 09-18-2012, 10:35 AM   #19
nobuntu
Member
 
Registered: Mar 2012
Distribution: Debian for server, CrunchBang for everything that's not a server
Posts: 143

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by youcantoo_linuxguy View Post
So are you using a dedicated (static) IP or is it dynamic ??? If it is dynamic there is a possibility that your IP address has changed so the IP you used before to access it is no longer viable. Try accessing your web server using http://localhost. What happens, do you see your web page???
Code:
That's a good point. I'm not great with networking, so I made an attempt at setting up a static IP but may have mangled some part of the process.
As for changing the port that Apache listens to you will need to modify your httpd.conf file. Look for the Listen directive. Example:

# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80 <--- ONLY USE THIS IF YOU HAVE A SINGLE STATIC IP
Listen *:80
Listen *:443

in my system I listen to any IP address on both ports 80 and 443 (SSL) to change it you would change that Listen line to say something like

Listen *:8080

restart your webserver (service httpd restart) and now it will listen to any IP address on Port 8080. NOTE you will have to be the root user to make changes to the httpd.conf file and to restart the httpd service.
Code:
THANK YOU! This clears up a BIG question I was wondering about; I attempted to edit httpd.conf without sudoing and was wondering why it was blank
.
---
 
Old 09-22-2012, 04:03 PM   #20
nobuntu
Member
 
Registered: Mar 2012
Distribution: Debian for server, CrunchBang for everything that's not a server
Posts: 143

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by youcantoo_linuxguy View Post
As for changing the port that Apache listens to you will need to modify your httpd.conf file. Look for the Listen directive. Example:

# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80 <--- ONLY USE THIS IF YOU HAVE A SINGLE STATIC IP
Listen *:80
Listen *:443

in my system I listen to any IP address on both ports 80 and 443 (SSL) to change it you would change that Listen line to say something like

Listen *:8080

restart your webserver (service httpd restart) and now it will listen to any IP address on Port 8080. NOTE you will have to be the root user to make changes to the httpd.conf file and to restart the httpd service.
I'm back to working on this.

I have copied my httpd.conf file contents below. Is this formatted correctly?

Code:
# Ensure that Apache listens on port 80

#Listen 184.187.181.38:4080
Listen *:80
Listen *:443

# Listen for virtual host requests on all IP addresses
NameVirtualHost *:4080

<VirtualHost *:80>
DocumentRoot /home/usr01/public_html/rain.solitary.org
ServerName rain.solitary.org

# Other directives here

</VirtualHost>
Thanks, everyone, for your help thus far
 
Old 09-22-2012, 05:00 PM   #21
nobuntu
Member
 
Registered: Mar 2012
Distribution: Debian for server, CrunchBang for everything that's not a server
Posts: 143

Original Poster
Rep: Reputation: 24
...and here's another question. I felt it would be more appropriate to post all server-related questions in this thread, so it can function as a central point for those helping me to check. Please correct me if I'm wrong.

As things stand right now, the server (an HP Compaq dx2200 Microtower, rescued from someone's trash heap during an afternoon walk) is running Xubuntu 12.04 with the Xfce GUI. A number of people have insinuated that this is perhaps not the most secure/economical setup, and that the GUI/server combination is frowned upon in general.

I can certainly understand this - obviously, a system with a GUI would need more resources to be allocated to it than a lean, simple command-line-based system. I would go right ahead and install minimal Debian over the current Xubuntu installation, however, neither I nor my friend and project-partner are adept enough at the command-line to be able to operate a server with any competency.

Taking this into account, what would be the best route for my friend/partner and I to follow?

a. "Leave everything be, including the GUI. It's OK to run a GUI on a server."

b. "Dive in and learn by doing. Wipe everything and install minimal Debian, then configure it to the best of your abilities."

c. "Install minimal Debian and a web-based control panel such as ISPConfig."

d. "Something else..." (Please elaborate!)

Thank you.
 
Old 09-23-2012, 08:52 AM   #22
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Code:
# Listen for virtual host requests on all IP addresses
NameVirtualHost *:4080

<VirtualHost *:80>
DocumentRoot /home/usr01/public_html/rain.solitary.org
ServerName rain.solitary.org
Um, this might cause trouble as you've got the same thing trying to listen to two different ports. So lets clear this up, as long as the router is doing port forwarding, and you can control the ports from there (as we discussed in an earlier post), there is absolutely no reason to have Apache listening to anything other than 80. Everywhere.

Now that said, that is an extremely limited httpd.conf file. Did you write that from scratch or did that start life as a default? Most distros will ship with a default httpd.conf that works, and you modify from there. If you've got a default one, you might consider going back to it, seeing if it works, and then modifying from there. One step at a time, check that nothing is broken, then move on. When you make a ton of changes at once, it can be really hard to diagnose what is going wrong.

Quote:
A number of people have insinuated that this is perhaps not the most secure/economical setup, and that the GUI/server combination is frowned upon in general.
A GUI running on a server is usually frowned upon because X is a bit of a resource hog and servers tend to be resource constrained, particularly those rescued from the trash bin. The security implications of X are relatively small, particularly if you configure X to not listen for connections.

Quote:
a. "Leave everything be, including the GUI. It's OK to run a GUI on a server."
If that is where you're comfortable, there is nothing fundamentally wrong here.

Quote:
"Dive in and learn by doing. Wipe everything and install minimal Debian, then configure it to the best of your abilities."
This would be my personal recommendation, but that is a personal preference, not a hard and fast rule. Most of the work you're going to be doing on the server is configuration and file management, all of which are really pretty easy from the console. There are perfectly good text editors (nano, vi) and file management tools like mc (Midnight Commander). Of course I'd recommend replacing Debain with Slackware, but that is because I think Slackware is the greatest distro evar!!!!!11!!!!

Quote:
"Install minimal Debian and a web-based control panel such as ISPConfig."
This would be my last choice, mainly because a number of the web-based control panels introduce some serious security concerns. Speaking of which, have you thought through system hardening and monitoring? If you're going to expose a server to the Great Unwashed, it is going to be attacked. There are a number of sticky threads in the Security forum that are worth a look.
 
1 members found this post helpful.
Old 09-23-2012, 01:33 PM   #23
nobuntu
Member
 
Registered: Mar 2012
Distribution: Debian for server, CrunchBang for everything that's not a server
Posts: 143

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by Hangdog42 View Post
Code:
# Listen for virtual host requests on all IP addresses
NameVirtualHost *:4080

<VirtualHost *:80>
DocumentRoot /home/usr01/public_html/rain.solitary.org
ServerName rain.solitary.org
Um, this might cause trouble as you've got the same thing trying to listen to two different ports. So lets clear this up, as long as the router is doing port forwarding, and you can control the ports from there (as we discussed in an earlier post), there is absolutely no reason to have Apache listening to anything other than 80. Everywhere.

Now that said, that is an extremely limited httpd.conf file. Did you write that from scratch or did that start life as a default? Most distros will ship with a default httpd.conf that works, and you modify from there. If you've got a default one, you might consider going back to it, seeing if it works, and then modifying from there. One step at a time, check that nothing is broken, then move on. When you make a ton of changes at once, it can be really hard to diagnose what is going wrong.



A GUI running on a server is usually frowned upon because X is a bit of a resource hog and servers tend to be resource constrained, particularly those rescued from the trash bin. The security implications of X are relatively small, particularly if you configure X to not listen for connections.


If that is where you're comfortable, there is nothing fundamentally wrong here.


This would be my personal recommendation, but that is a personal preference, not a hard and fast rule. Most of the work you're going to be doing on the server is configuration and file management, all of which are really pretty easy from the console. There are perfectly good text editors (nano, vi) and file management tools like mc (Midnight Commander). Of course I'd recommend replacing Debain with Slackware, but that is because I think Slackware is the greatest distro evar!!!!!11!!!!



This would be my last choice, mainly because a number of the web-based control panels introduce some serious security concerns. Speaking of which, have you thought through system hardening and monitoring? If you're going to expose a server to the Great Unwashed, it is going to be attacked. There are a number of sticky threads in the Security forum that are worth a look.
With regards to the httpd.conf file: it is not a default file, it is something I pieced together from Apache's documentation on Virtual Hosts. I remember I copied & modified it at about 2:00 a.m., so I was very tired and not exactly alert, and I don't really know what I'm doing in the first please with it. I'm not surprised that it is 'limited'.

Here's how it looks now, edited with your advice in mind:

Code:
# Ensure that Apache listens on port 80

#Listen 184.187.181.38:80
Listen *:80
Listen *:443

# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /home/usr01/public_html/rain.solitary.org
ServerName rain.solitary.org

# Other directives here

</VirtualHost>
Would it perhaps be a better idea to edit something like this to fit my needs?

I'll have to look into Slackware - I haven't tried it before and know nothing about it, other than that people who like it really like it and people who don't really don't.

Security? Watszat? I'm not very well-versed in server security on the software side of things, but I will take a look through the sticky threads you mentioned. Thank you!
 
Old 09-23-2012, 02:30 PM   #24
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
Would it perhaps be a better idea to edit something like this to fit my needs?
What would be an even better idea would be to use the one that came with xubuntu. There should have been one by default. The one you linked to looks kind of old, and while it might work, Apache has done a lot of changing about what directives go in what files.

If you stick with the one you've started, be VERY sure to look in the Apache log files and see if you are missing any directives. Apache not starting properly could be a big part of why this isn't working.
 
Old 09-23-2012, 04:25 PM   #25
nobuntu
Member
 
Registered: Mar 2012
Distribution: Debian for server, CrunchBang for everything that's not a server
Posts: 143

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by Hangdog42 View Post
What would be an even better idea would be to use the one that came with xubuntu. There should have been one by default.
O.K., simplistic question time. Where exactly do I find the default httpd.conf? Is there a backup somewhere other than /etc/apache2 (the location where I overwrote httpd.conf with my changes)? Or can I find a copy online somewhere?

Thanks!
 
Old 09-23-2012, 04:49 PM   #26
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
O.K., simplistic question time. Where exactly do I find the default httpd.conf? Is there a backup somewhere other than /etc/apache2 (the location where I overwrote httpd.conf with my changes)? Or can I find a copy online somewhere?
Well, it should be along with the rest of the Apache .conf files, so if you overwrote httpd.conf, you'll have to find a new copy. I did a quick google and nothing jumped out. I suppose you could uninstall, and reinstall the apache packages, that should put a new one in place.

As you're learning, it is a really good idea to make backups of files you're messing with. Heck, even if you're not learning, it is a good idea. You never know when you're brain checks out at a crucial moment, so having a backup can save your bacon.
 
Old 09-23-2012, 05:23 PM   #27
nobuntu
Member
 
Registered: Mar 2012
Distribution: Debian for server, CrunchBang for everything that's not a server
Posts: 143

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by Hangdog42 View Post
Well, it should be along with the rest of the Apache .conf files, so if you overwrote httpd.conf, you'll have to find a new copy. I did a quick google and nothing jumped out. I suppose you could uninstall, and reinstall the apache packages, that should put a new one in place.
I seem to have found another way:

1. Download the latest release of Apache httpd
2. Extract files
3. Search for httpd.conf in the folder in which the files were extracted

Catfish has come up with something named httpd.conf.in, but it seems to me that it is the same as httpd.conf. I may be wrong on this, so I'm copying it below for verification.

Code:
#
# 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.4/> for detailed information.
# In particular, see 
# <URL:http://httpd.apache.org/docs/2.4/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 "logs/access_log"
# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" 
# will be interpreted as '/logs/access_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 specify a local disk on the
# Mutex directive, if file-based mutexes are used.  If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot "@@ServerRoot@@"

#
# Mutex: Allows you to set the mutex mechanism and mutex file directory
# for individual mutexes, or change the global defaults
#
# Uncomment and change the directory if mutexes are file-based and the default
# mutex file directory is not on a local disk or is not appropriate for some
# other reason.
#
# Mutex default:@rel_runtimedir@

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen @@Port@@

#
# 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
#
@@LoadModule@@

<IfModule unixd_module>
#
# 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 daemon
Group daemon

</IfModule>

# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin you@example.com

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:@@Port@@

#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other 
# <Directory> blocks below.
#
<Directory />
    AllowOverride none
    Require all denied
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "@exp_htdocsdir@"
<Directory "@exp_htdocsdir@">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

#
# The following lines prevent .htaccess and .htpasswd files from being 
# viewed by Web clients. 
#
<Files ".ht*">
    Require all denied
</Files>

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog "@rel_logfiledir@/error_log"

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

<IfModule log_config_module>
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

    #
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    #
    CustomLog "@rel_logfiledir@/access_log" common

    #
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #
    #CustomLog "@rel_logfiledir@/access_log" combined
</IfModule>

<IfModule alias_module>
    #
    # Redirect: Allows you to tell clients about documents that used to 
    # exist in your server's namespace, but do not anymore. The client 
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://www.example.com/bar

    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.

    #
    # ScriptAlias: This controls which directories contain server scripts. 
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ "@exp_cgidir@/"

</IfModule>

<IfModule cgid_module>
    #
    # ScriptSock: On threaded servers, designate the path to the UNIX
    # socket used to communicate with the CGI daemon of mod_cgid.
    #
    #Scriptsock cgisock
</IfModule>

#
# "@exp_cgidir@" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "@exp_cgidir@">
    AllowOverride None
    Options None
    Require all granted
</Directory>

<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig @rel_sysconfdir@/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    #AddHandler cgi-script .cgi

    # For type maps (negotiated resources):
    #AddHandler type-map var

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
</IfModule>

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type.  The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
#MIMEMagicFile @rel_sysconfdir@/magic

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# MaxRanges: Maximum number of Ranges in a request before
# returning the entire resource, or one of the special
# values 'default', 'none' or 'unlimited'.
# Default setting is to accept 200 Ranges.
#MaxRanges unlimited

#
# EnableMMAP and EnableSendfile: On systems that support it, 
# memory-mapping or the sendfile syscall may be used to deliver
# files.  This usually improves server performance, but must
# be turned off when serving from networked-mounted 
# filesystems or if support for these functions is otherwise
# broken on your system.
# Defaults: EnableMMAP On, EnableSendfile Off
#
#EnableMMAP off
#EnableSendfile on

# Supplemental configuration
#
# The configuration files in the @rel_sysconfdir@/extra/ directory can be 
# included to add extra features or to modify the default configuration of 
# the server, or you may simply copy their contents here and change as 
# necessary.

# Server-pool management (MPM specific)
#Include @rel_sysconfdir@/extra/httpd-mpm.conf

# Multi-language error messages
#Include @rel_sysconfdir@/extra/httpd-multilang-errordoc.conf

# Fancy directory listings
#Include @rel_sysconfdir@/extra/httpd-autoindex.conf

# Language settings
#Include @rel_sysconfdir@/extra/httpd-languages.conf

# User home directories
#Include @rel_sysconfdir@/extra/httpd-userdir.conf

# Real-time info on requests and configuration
#Include @rel_sysconfdir@/extra/httpd-info.conf

# Virtual hosts
#Include @rel_sysconfdir@/extra/httpd-vhosts.conf

# Local access to the Apache HTTP Server Manual
#Include @rel_sysconfdir@/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
#Include @rel_sysconfdir@/extra/httpd-dav.conf

# Various default settings
#Include @rel_sysconfdir@/extra/httpd-default.conf

# Configure mod_proxy_html to understand HTML4/XHTML1
<IfModule proxy_html_module>
Include @rel_sysconfdir@/extra/proxy-html.conf
</IfModule>

# Secure (SSL/TLS) connections
#Include @rel_sysconfdir@/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

# Deal with user agents that deliberately violate open standards
#
<IfModule setenvif_module>
BrowserMatch "MSIE 10.0;" bad_DNT
</IfModule>
<IfModule headers_module>
RequestHeader unset DNT env=bad_DNT
</IfModule>
[QUOTE=Hangdog42;478747As you're learning, it is a really good idea to make backups of files you're messing with. Heck, even if you're not learning, it is a good idea. You never know when you're brain checks out at a crucial moment, so having a backup can save your bacon.[/QUOTE]

That, my friend, is an excellent idea, and one that I should have observed early on. Going forward, I will be sure to make backups.
 
Old 09-23-2012, 05:36 PM   #28
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Yeah, that is the right file. It might take some tweaking since it is generic and Xubuntu may have done some customizations, but the errors should be obvious when you start apache.
 
Old 09-23-2012, 05:52 PM   #29
nobuntu
Member
 
Registered: Mar 2012
Distribution: Debian for server, CrunchBang for everything that's not a server
Posts: 143

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by Hangdog42 View Post
Yeah, that is the right file. It might take some tweaking since it is generic and Xubuntu may have done some customizations, but the errors should be obvious when you start apache.
O.K., good.

I'm not sure I'll be spending much time on this just now, as I've been staring at a screen all day, but I certainly will continue to work on this very soon - within the week. I will return to this thread with any questions.

Thanks for all your help thus far.
 
Old 09-23-2012, 07:06 PM   #30
youcantoo_linuxguy
LQ Newbie
 
Registered: Oct 2006
Location: Lebanon, OR
Distribution: PCLinuxOS
Posts: 21

Rep: Reputation: 0
Quote:
Originally Posted by R3nCi View Post
I'm back to working on this.

I have copied my httpd.conf file contents below. Is this formatted correctly?

# Ensure that Apache listens on port 80
This is what you want your Listen Directives to look like


Listen 184.187.181.38:4080
# Listen *:80
# Listen *:443


Quote:
# Listen for virtual host requests on all IP addresses
NameVirtualHost *:4080
Change the following to match the port you are using

<VirtualHost *:80> change this to <VirtualHost *:4080>

Quote:
DocumentRoot /home/usr01/public_html/rain.solitary.org
ServerName rain.solitary.org

# Other directives here

</VirtualHost>

Thanks, everyone, for your help thus far
Also remember to restart the web service (service httpd restart)
and remember to browse your site you will need to use http://localhost:4080

Since you changed the default listening port you have to tell it which port to look at

Last edited by youcantoo_linuxguy; 09-23-2012 at 07:13 PM. Reason: left out some information
 
  


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
Server goes online when started and stays online ... joepl Linux - Networking 1 08-18-2005 02:12 PM
I need to close x server, how? NoS Sr50 Linux - Newbie 9 09-05-2004 10:29 PM
How do I close my X server? kkj Linux - Newbie 2 04-06-2004 12:59 AM
Close X Server? JREAMER Linux - General 3 06-08-2003 06:02 PM

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

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