Ubuntu Servers :: Apache/PHP Set Root Directory Of Website?

Nov 27, 2010

In my website, I'm putting shared files in a "/global" folder. Both "styles.css" and "library.php" are in this global folder. HTML code seems to be working ok - the following bit works great to pick up a style sheet:

Code:
<link rel="stylesheet" type="text/css" href="/global/styles.css" /> However PHP does not seem to understand my root directory. Using the following does not work:
Code:
include_once("/global/library.php");

I receive a "failed to open stream: No such file or directory" error.Spelling out the entire full path works, like so:

Code:
include_once("/srv/www/mysite/global/library.php");

But this type of code is no good as I may change servers in the future. I have my "DocumentRoot" set correctly in my sites-available file. It seems as if PHP is ignoring it. Is there a config file someplace (htaccess? Local php.ini?) where I should update my root directory for this site only? Or am I following bad form and there's a better way to do this? Relative paths don't seem like the answer here though...

View 5 Replies


ADVERTISEMENT

Ubuntu Servers :: 9.1 Setup - How To Get Apache To Display Website

Jan 10, 2010

I have Ubuntu 9.1 setup, with ISPCONFIG3, squirrel mail, apache2, mysql, phpmyadmin, phpbb3 so now what, what do I need to do next to setup to get apache to display my website and where do I need to put my web files?

View 1 Replies View Related

Ubuntu Servers :: Website Not Updating Without Apache Restart?

Feb 1, 2011

I've installed Ubuntu server and got everything setup pretty well.My problem is apache.I put my website in /var/www and changed the security on the files to allow them to be executed by other, which is what I finally discovered was my first problem (access denied). But now whenever.I go in and edit my page, the changes aren't reflected on the site unless I completely restart apache.I know I'm doing something wrong because I used to pay for a host and every time I edited a page, it was instantly updated on the site. Could one of you gurus tell me where I screwed up?

View 4 Replies View Related

Fedora Servers :: Apache Won't Pickup Website

Feb 7, 2010

Apache wont picup my website when i dropped my Site folder in the /var/www/html directory even after starting the Apache service.

View 2 Replies View Related

Ubuntu Servers :: Associate Internal ISS With Website Hosted By Apache?

Apr 18, 2011

we have a dual server setup: Windows server 2003 and Ubuntu 10.04 with apache installed with all the goodies. This is all virtualized. What I'm wanting to do, is make the new website we've created run on the Ubuntu machine, which it is, and be accessible outside the office. However, by doing this, we forfeit being able to use remote access or web exchange on Windows server 2003.

How can I create a link from the new website on Apache point to the internal server and it work outside of the office?

View 7 Replies View Related

Ubuntu Servers :: PWD Protect Directory Containing Website

Jul 8, 2011

My brother and I currently use a shared server, we both connect via SSH. I store files (via SFTP) on it as I only normally use a laptop. He uses to host his own personal files and also a public website promoting his photography business. I am interested in cryptography and security and have restricted our SSH connections to require keys and use encfs to encrypt my personal folder. Comments on this are welcome.

I am struggling to work out how to protect his home folder without preventing access to his site. Normal methods prevent access entirely or require the web browser to enter a password (no good for promotion). I would like to prevent both alien users and myself from accessing his home folder but still allow his website to be functional from within this area of restricted access. Both the site and his personal files need to be protected.

View 2 Replies View Related

Fedora Servers :: Make A Website With A Virtual Host Of Apache Visible?

Nov 8, 2010

In first place i am sorry about my horrible English. I want to make a web site with a virtual host of apache visible by all the computers connected to my networking. I put this in the end of the file "/etc/httpd/conf/httpd.conf"("192.168.1.194" is the IP address of my computer. The default gateway IP address is "192.168.1.1"):

[Code]...

It works if i go to "http://192.168.1.194/" with the browser of the computer with apache inside, but on the others PC of my networking this method don't work!

View 2 Replies View Related

Ubuntu Servers :: Apache - Execute A Bash Script That Uploads A File To Another Server Through A Website?

Sep 20, 2010

I have a web server in my kitchen with apache running on it. Since the upload speed is quite low due to my isp I would like to execute a bash script that uploads a file to another server through a website (which is htaccess protected) The idea in general: Someone with access to my website browses through a folder, copies a file path to an input form and presses "upload". Rather than executing a bash script directly I could have a cron job running in background that finds the path and then uploads the file to the other server I have userspace on and is accessible via sftp/ssh. The file would be than erased later after a couple of days or so. That person would be able to access the file with higher speed some time later without logging in via ssh and doing all that manually.

View 2 Replies View Related

Ubuntu Servers :: LAMP Installed > Need To Change Website Directory?

Jun 13, 2010

I just installed LAMP on ubuntu 10.04using this method:ow i want to change the directory where my websites are; default is "/var/www" right. I have a partition using NTSF file system where i have a folder with all my websites. Can i configure LAMP to use this folder?

View 9 Replies View Related

Red Hat / Fedora :: Cannot Access Symlinks In Apache Root Directory

Nov 17, 2008

I have configured apache on my Centos 5.2 and it is working well. I want to have a sym link of my docs directory in /root/ in the apache root directory. I used ln -s command to create this sym link. But when I tried to access this I get the following error:

You don't have permission to access /docs on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

How can I access this directory in apache. i use apache 2.0.63.

View 1 Replies View Related

Fedora :: Unable To Edit The Files Under Root Directory Of Apache?

Jun 12, 2011

why i m unable to edit the files under root directory of apache ?and how to fix that plz tell me ?

View 3 Replies View Related

Ubuntu Servers :: Apache Won't Use User Directory

May 12, 2010

I'm configuring Apache for the first time on this box (8.04 LTS) and Apache2 for the first time ever. "Out of the box" it runs fine and I get the "It Works" page okay. But I'd like to use the virtual site feature to direct Apache to a folder in my user space, and I keep getting errors.

When I point a browser at localhost, the 404 message is "The requested URL / was not found on this server." and the /var/log/apache2/error.log ends with "File does not exist: /htdocs.

Here's my config file from the apache2/sites-available folder:

Code:

I diff'ed this file with the default and the only differences are in the DocumentRoot line and the <Directory ...> line.

My public_html folder has permissions 755 and the index.html file is 644.

View 7 Replies View Related

Ubuntu Servers :: Create New WWW Directory Apache?

May 13, 2011

I want to make a image directory in the WWW folder. It works fine, but when I link to the images on the page it stands that I don?t have permission to the picture, 403. How do I set the permission?

View 2 Replies View Related

Ubuntu Servers :: Apache Directory Browsing Not Working?

Jul 19, 2010

I had directory browsing enabled in Apache on a previous computer, but I can't get it working again:heres my apache2.conf

Code:
#
#Based upon the NCSA server configuration files originally by Rob McCool.

[code].....

View 6 Replies View Related

Ubuntu Servers :: (IMO) Apache - Directory PHPInfo Does Not Exist

Mar 23, 2011

Have Apache running on Ubuntu Server. Say I have a domain, www.somewhere.com, and I have uploaded a file, phpinfo.php. If I hit http://www.somewhere.com/phpinfo.php, I get my file as expected. However, If I hit non-existent file http://www.somewhere.com/phpinfo/somefile.dat, it also acts as if I hit phpinfo.php, instead of giving me a 404 error. It seems that because the DIRECTORY "phpinfo" does not exist, it decided that I must have meant to hit phpinfo.php at the root of the site.

If I create an empty "phpinfo" directory then it behaves as expected and gives me a 404 not found page. This is reproducible for any other file name you can think of. I'm sure this is some Apache convenience behavior but I would like to disable it (it is messing with some mod_rewrite stuff I would like to do). Because it's hard to describe I cannot figure out which Apache option it might be (whatever I Google for gives me completely unrelated results).

View 9 Replies View Related

Ubuntu Servers :: Apache 403 Error With Changed Www Root?

Feb 9, 2011

I don't know if this the right place to ask this question. If not excuse me.I installed apache server on my ubuntu and I've changed the www folder in etc/apache/.../default from /var/www to home/user/www but now i haveForbiddenYou don't have permission to access / on this server.

View 3 Replies View Related

Fedora Servers :: Apache Says User Directory 'Not Found'

Feb 2, 2009

I have FC10 newly installed, and Apache is serving content from /var/www/ okay.

I'm trying to get Apache to serve web content from user's home directories. This is what I've tried with no success:

Uncommented 'UserDir public_htm' in /etc/httpd/conf/httpd.conf and commented out 'UserDir disabled'.

And...

Uncommented user directory section in /etc/httpd/conf/httpd.conf. It now reads as follows:
#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#

[Code].....

I also tried setenforce 0 to temporarily disable SELinux until the next reboot. No luck. It doesn't appear to be an SELinux issue.

That's as far as the information available will take me. I still get URL 'Not Found' when I try to access http://192.168.0.2/~myusername/

setting up user home directory web access?

View 1 Replies View Related

Ubuntu Servers :: Setting Apache DocRoot To Folder In Home Directory

Jan 9, 2010

Vanilla install of Karmic (64 bit) - would like to change the Apache doc root to point to /home/sam/www as it's my web development machine. (Default install is working fine)
Created copy of 'default' to 'mylocal' in '/etc/apache2/sites-available'

Code:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/sam/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/sam/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
...

The permissions on the folder in my home dir:
Code:
sam@rocket:~$ ls -la ww*
total 16
drwxrwxrwx 2 sam sam 4096 2010-01-09 22:26 .
drwx------ 35 sam sam 12288 2010-01-09 22:11 ..
-rwxrwxrwx 1 sam sam 100 2010-01-09 22:27 index.html
sam@rocket:~$ pwd
/home/sam
sam@rocket:~$
The sites enabled set up:

Code:
root@rocket:/etc/apache2# ls -la sites-enabled/
total 8
drwxr-xr-x 2 root root 4096 2010-01-09 22:24 .
drwxr-xr-x 7 root root 4096 2009-12-20 00:22 ..
lrwxrwxrwx 1 root root 26 2010-01-09 22:24 mylocal -> ../sites-available/mylocal
But I still get:
"Forbidden
You don't have permission to access / on this server".

View 8 Replies View Related

Ubuntu Servers :: Directory Listing Missing File Icons For Apache

Sep 9, 2010

For some reason my directory listings are missing their icons for Apache on Ubuntu Server. An example: [URL]. They all come up not found.

View 6 Replies View Related

Ubuntu Servers :: Apache - Change The Permissions For A Directory And All Files Inside

Dec 12, 2010

I would like to change the permissions for a directory and all files inside the directory how do I do this? The website is located only on my local network so I am not worried about security. Also what would be the optimal permissions for running wordpress.

View 1 Replies View Related

Ubuntu Servers :: Apache Document Root External Hard Drive

Apr 28, 2010

I am trying to use my external hard drive to store webpages and on the webpages it is uploaded to the folder. When i navigate to the address it says it is forbidden. I also noticed that it would not let me upload files to the folder it says i do not have permission. Can someone help me get passed the barriers. The hard drive is ntfs.

View 7 Replies View Related

Fedora Servers :: Apache Binding To Active Directory - Use Web Shares?

Feb 9, 2009

Something that has been in the pipleline at work for a while is user-based web directories. Main PDCs are running Windows Server 2003 using Active Directory, ideally what would happen is that users have a web share under [URL].. - the server behind this would be Linux (either Fedora or CentOS).

What kind of configuration would be needed for Apache to make this possible? The way I have planned so far is to have the Linux box auth against the AD domain (possibly joined), with Apache setup to share local public_html folders. Not sure how I can get rid of the tilde from the start of the username, but it should be pretty easy.

View 1 Replies View Related

Fedora Servers :: User Directory Apache Results In 403 Errors?

Mar 14, 2009

I want to enable User Directories in Apache. So in httpd.conf I set:

Code:
<IfModule mod_userdir.c>
#UserDir enabled // commented out
UserDir public_html
</IfModule>
Directory /home/kees is listed has the following file permissions: drwx--x--x 32 kees kees
Directory /home/kees/public_html has the following file permissions: drwxr-xr-x 2 root root

Directory public_html has two files: index.html and index.php, both with file permissions: -rwxr-xr-x 1 root root If I now try to open http://myhost/~kees/index.html (or index.php) in my browser I get a 403 Forbidden error. If I look in my error log I see the following messages if I first try to open the index.html and then the index.php file:

[Code]...

View 4 Replies View Related

Ubuntu Servers :: Make Apache Show Symbolic Links In A Directory Listing?

Jul 17, 2011

I am trying to make my Apache server show symbolic links in a directory listing, but have so far been unsuccessful. In my latest attempt, I have placed the following code in .htaccess, in the directory with the symlinks that I want listing:

Code:
<Directory />
Options All
</Directory>
Im httpd-vhosts.conf, I have also placed the following code within the relative <VirtualHost></VirtualHost>:

View 5 Replies View Related

Fedora Servers :: Apache - Creating Symbolic Links To Movies Directory

Mar 6, 2009

I'm using FC10 and I want to create a symlink to my movies directory in my home folder:

This is what I did:
I created in
/var/www/html
ln -s /home/username/movies movies

Then in /etc/httpd/conf/httpd.conf
DocumentRoot "/var/www/html"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<Directory "/home/username/movies">
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>

Restart apache and then the test page is working.

The directory /home/username/movies has following permissions:
drwxrwxrwx 2 apache apache 4096 2009-03-05 23:43 movies
When trying to access my webpage at localhost/movies I get the 403 Forbidden Error.
Ok then, entering:
sudo -u apache ls /var/www/html
> movies
This works, sudo -u /var/www/html/movies returns the permission denied error.
As well sudo -u /home/username/movies
Is the user apache chrooted by default? SELinux is in permissive mode. What can I do?

View 4 Replies View Related

Fedora Servers :: F11 & Apache Permissions - Reading Files Out Of The Html Directory

Jun 12, 2009

With F11 installed Apache is having permissions issues reading files out of the html directory. Only wants to work with permissions set to read for other. [Thu Jun 11 23:25:28 2009] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /var/www/html/index.html Tracked down the permissions issue. Is there a good reason not to change the group to apache and remove world read?

View 1 Replies View Related

Ubuntu Servers :: Change Tomcat6 Root Directory In 9.10?

Jan 6, 2010

I have newly installed Ubuntu server 9.10 in my server machine.And it has tomcat6 in itself.My friend have built a Java software in Fedora ,and he wants to move it to the new server.But problem is the directory structure is different between two systems.He has to either change his directory setting in his software or change the default tomcat6 ROOT directory. But I have not find any configuration file can do this job(change the tomcat default ROOT directory ).

View 3 Replies View Related

Ubuntu Servers :: Increase Size Of Root Directory?

Sep 27, 2010

Is it possible to increase the size of the root directory / on ubuntu 9.10?

View 5 Replies View Related

Fedora Servers :: Document Root Must Be A Directory

Jul 30, 2009

I am trying to get apache to start at boot in Fedora 10 but I am getting "Document root must be a directory", I tried to change the Selinux settings with:
chcon -R -h -t httpd_sys_content_t /www

I checked the new settings with ls -aZ and the changes apear to be fine.
apache apache unconfined_u:object_r:httpd_sys_content_t:s0
But I still get the same message on my boot.log file.

View 9 Replies View Related

Ubuntu Servers :: Command Line To Copy File To Root Directory

May 12, 2010

I want to copy file from the Server cd drive and USB drive to the server root directory, but I haven't find any command of listing the cd drive or usb drive.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved