Owncloud 3 port and Apache22 server

Discussion related to network/web services such as Apache, BIND Sendmail, etc.

Owncloud 3 port and Apache22 server

Postby badhat101 » 22 Apr 2012, 23:17

I want to try out Owncloud from ports and I thought I had set everything up correctly (I am quite new to webservers). When I browse to my local ip and port I get "It works!" from apache (I assume). When I browse to 192.168.1.200:444/owncloud I am told
Code: Select all
403 Forbidden: You don't have permission to access /owncloud/ on this server.


My first thought was a permissions issue so I went ahead and [cmd=]# chmod -R 777 /usr/local/www/owncloud[/cmd]

My [file]/usr/local/etc/apache22/httpd.conf[/file] has a relevant section that looks like
Code: Select all
</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.

Alias /owncloud /usr/local/www/owncloud
        AcceptPathInfo On
        <Directory /usr/local/www/owncloud>
            AllowOverride All
            Order Allow,Deny
            Allow from all
        </Directory>


Is there something I am missing? My apache root document directory is owned by root. Should I have a user on the system that is apache or www or something?
badhat101
Junior Member
 
Posts: 23
Joined: 08 Aug 2010, 21:27

Postby SirDice » 23 Apr 2012, 09:19

Set the correct [file]DirectoryIndex[/file]. You get this error because [file]DirectoryIndex[/file] is not set properly and Apache is set to deny a directory listing.
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
User avatar
SirDice
Old Fart
 
Posts: 16161
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands

Postby badhat101 » 24 Apr 2012, 01:02

Ok, I have added
Code: Select all
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>


I can now access a page, though it is only the contents of the file [file]index.php[/file] inside of [file]/usr/local/www/owncloud/[/file]. Like I said, I am new to webservers. Do I have to tell Apache something about my [file]DocumentRoot[/file] because OwnCloud does not reside in the same directory?
badhat101
Junior Member
 
Posts: 23
Joined: 08 Aug 2010, 21:27

Postby SirDice » 24 Apr 2012, 06:07

If you're looking at the contents of [file]index.php[/file] PHP isn't configured correctly.

You need to add these line to your [FILE]httpd.conf[/FILE]:
Code: Select all
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
User avatar
SirDice
Old Fart
 
Posts: 16161
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands


Return to Web & Network Services

Who is online

Users browsing this forum: No registered users and 1 guest