You are not logged in.

#1 2015-07-22 04:53:11

mutnauq7
Member
Registered: 2015-07-22
Posts: 3

Access forbidden Error 403 localhost and Options ExecCGI is off error

Hello,

I'm suffering from the Apache problem.
I got an error in the localhost.

403 Forbidden
You don't have permission to access /~webmo/cgi-bin/webmo/login.cgi on this server.

But I

-commented UserDir disabled
-uncommented  UserDir public_html
-remove Indexes after Options
-Add User directory address totally end of the file
#</VirtualHost>
<Directory /home/webmo/public_html/cgi-bin>
            #Enable cgi scripts in user directories
            Options +ExecCGI
            Options FollowSymLinks
            AllowOverride None
            Order deny,allow
             Allow from all
            </Directory>
-chmod -R o+x $HOME

Following is my httpd.conf file.

 

# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
#ServerName [url=http://www.example.com:80]www.example.com:80[/url]
#ServerName hartree.kaist.ac.kr:80

#
# UseCanonicalName: Determines how Apache constructs self-referencing
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client.  When set "On", Apache will use the value of the
# ServerName directive.
#
UseCanonicalName Off

#
# 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 "/home/webmo/public_html/"
DocumentRoot "/var/www/html"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
</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.
#
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">

#
# 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
# [url]http://httpd.apache.org/docs/2.2/mod/core.html#options[/url]
# for more information.
#
    Options 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.
#
    Order allow,deny
    Allow from all

</Directory>

#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory must be
# accessible to the webserver userid.  This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
# See also: [url]http://httpd.apache.org/docs/misc/FAQ.html#forbidden[/url]
#

<IfModule mod_userdir.c>
    #
    # UserDir is disabled by default since it can confirm the presence
    # of a username on the system (depending on home directory
    # permissions).
    #
    #UserDir disabled

    #
    # To enable requests to /~user/ to serve the user's public_html
    # directory, remove the "UserDir disabled" line above, and uncomment
    # the following line instead:
    #
    UserDir public_html


</IfModule>

#
# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
#<Directory /home/*/public_html>
#    AllowOverride FileInfo AuthConfig Limit
#    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
#    <Limit GET POST OPTIONS>
#        Order allow,deny
#        Allow from all
#    </Limit>
#    <LimitExcept GET POST OPTIONS>
#        Order deny,allow
#        Deny from all
#    </LimitExcept>
#</Directory>
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents.  The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.html index.html.var

#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>

#
# TypesConfig describes where the mime.types file (or equivalent) is
# to be found.
#
TypesConfig /etc/mime.types
.
.
.
#
# 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 files that include their own HTTP headers:
#
#AddHandler send-as-is asis
.
.
.
#<VirtualHost *:80>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
<Directory /home/webmo/public_html/cgi-bin>
            #Enable cgi scripts in user directories
            Options +ExecCGI
            Options FollowSymLinks
            AllowOverride None
            Order deny,allow
             Allow from all
            </Directory>

When I checked /var/log/httpd/error_log file, I got the message like this.

Options ExecCGI is off in this directory: /home/webmo/public_html/cgi-bin/webmo/login.cgi

What should I have to change?
I tried related questions/answers to solve this but I still have error.


Would you give any advice for me?
Thank you!

Last edited by mutnauq7 (2015-07-22 05:33:29)

Offline

#2 2015-07-22 05:07:56

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: Access forbidden Error 403 localhost and Options ExecCGI is off error

mutnauq7 wrote:

Would you give any advice for me?

Use code tags to make your post more legible. It will make it easier to others to read and understand your post, then maybe offer you assistance.

Offline

#3 2015-07-22 05:37:13

mutnauq7
Member
Registered: 2015-07-22
Posts: 3

Re: Access forbidden Error 403 localhost and Options ExecCGI is off error

Thank you fukawi2!
I modified using code tags.
I hope this is enough to find the solutions.
If more information is required for understanding, let me know smile

Offline

#4 2015-07-22 05:43:28

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: Access forbidden Error 403 localhost and Options ExecCGI is off error

Did you restart apache after changing your config file(s)?

Offline

#5 2015-07-22 06:12:17

mutnauq7
Member
Registered: 2015-07-22
Posts: 3

Re: Access forbidden Error 403 localhost and Options ExecCGI is off error

yes.. of course T_T...

Offline

Board footer

Powered by FluxBB