Ubuntu :: Configuring Apache And PHP To Use Same Doc Root
Feb 2, 2010
I'm new to Ubuntu and installed Apache, Tomcat and PHP using separate packages. All work well but it seems that the default doc root for Apache and PHP are in different places as:The following command to start Apache: sudo /usr/local/apache2/bin/apachectl start brings me to the "Test Page for Apache Install" and shows the Apache logo--successful--when I hit URl....Also, could someone please tell me how to stop PHP from starting Apache on boot?
View 5 Replies
ADVERTISEMENT
May 26, 2011
I'm trying to install Zimbra and Apache. I'm having difficulty setting up DNS (if necessesary) and also configuring my /etc/hosts show me what the /etc/hosts should look like.
View 3 Replies
View Related
Aug 11, 2010
where i can learn configuring DNS and apache
View 1 Replies
View Related
Oct 19, 2009
I have to go through an ERP projects. "README" file to setup the software gives following instruction which I have attached with this thread.So, according to first step I copied the entire "dolibarr-2.6.1" folder in "/usr/local/apache2". But whenever I call the browser with address given in "README" file my browser gives the following error message : Code: Firefox can't establish a connection to the server at localhost.Please let me know how can I configure the Web Server so that I can use the software.
View 1 Replies
View Related
Jan 21, 2009
I have a Apache web server and a separate tomcat 5 server. I can run the jsp-exaples just fine using HTTP. However using HTTPS fails. For some reason it appears HTTPS is not forwarding to the connector, I get 404 not found, returned.If I simply try https://apache_server_ip I successfully connect to the default Apache page.According to this page it should just work. Apache should do the ssl encryption/decryption and tomcat operate as normal.
View 1 Replies
View Related
Jun 6, 2010
I am using the virtualhosts feature of Apache web server to host multiple domains on a single web-server. Is it possible to have different settings for php for different domains?
For eg:- I have mydomain1.com and mydomain2.com hosted on the same server. I want php scripts of mydomain1.com to connect to database but prevent database access for scripts of mydomain2.com. There are many php functions that I want to restrict for mydomain2.com.
View 5 Replies
View Related
Apr 22, 2010
i am in the process of installing apache 2.2 with php 5.3.2, my problem is that after installing and configuring them , this important module libphp5.so is no where to be seen under /usr/local//apache2/modules/, so when i attempt to start or stop apachectl , i get the following errors ..
httpd: Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory
this is how am loading the module in httpd.conf
#LoadModule php5_module modules/libphp5.so
why isn't this file there . is there a way i can get this to work
View 2 Replies
View Related
Sep 24, 2010
I have a problem with AMXbans. My Linux is Slackware 13.0. , mysql is version 5.0.84, Apache/2.2.13,PHP 5.2.3 from locahost or real IP in internet explorer i see this error " Lost connection to MySQL server at 'reading initial communication packet', system error: 111".
In /var/log/httpd/error_log I see this error:
" [error] [client IP] PHP Warning: mysql_connect()
[<a href='function.mysql-connect'>>function.mysql-connect</a>]:
Lost connection to MySQL server at 'reading initial communication packet',
system error: : 111 in /var/www/htdocs/web/include/config.inc.php on line 48,
referer: http://My real IP/web/
//connect to db - "this is line 46"
$config->db_host=gethostbyname($config->db_host); "this is line 46"
$mysql = mysql_connect($config->db_host,$config->db_user,$config->db_pass) or die (mysql_error()); - "this is line 48"
View 1 Replies
View Related
Apr 24, 2010
I am about to configure LAMP (Linux, Apache, MySQL and PHP) and following this link.However, I want to use Apache Tomcat instead of Apache, can I do so ?I can very well try and figure this out, but was just curious if someone has tried it. Or may be I can get some more ideas and useful links.I am just trying for knowledge.Meanwhile, if someone else is interested, these are the links used to download appropriate source packages.
- JRE & JDK : Java Platform Standard Edition (Java SE) 6 Update 10
- Tomcat
- Apache Ant
Here, "Apache" Ant is a software tool for automating software build processes. It is similar to Make but is implemented using the Java language, requires the Java platform, and is best suited to building Java projects.
- PHP 5.2.13
- MYSQL 5.0.90
View 2 Replies
View Related
Oct 2, 2010
I have succesfully installed Apache... It works fine with PHP-MySQL support... I love it too...
But the thing is that I have to store all my files in /var/www/html/ which sort of annoys me... I was wondering of there is any method to reconfigure the httpd.conf file to do it...
All the mods I tried crashed the server....
View 3 Replies
View Related
Apr 25, 2009
I've decided to install apache server from groundzero. So I've done next things:1)downloaded source tar with apache22)unzipped it3)./configure(d) it4)make5)make install
...But!!! I can't start it. apachectl in /usr/local/apache2/bin
error answer is:
<code>
[root@dhcppc1 bin]# apachectl start
[code]...
View 6 Replies
View Related
Apr 9, 2010
I'd like to boot my windoze partition in opensuse. However,
System > Virtualization > Create Virtual Machines Yields nothing.
Only asks for root PW, and then does nothing else. Xen is installed.
View 9 Replies
View Related
Jul 31, 2011
I installed the Centos 5.5 on a WM instance. Run out of space after doing the updates. It is very difficult to keep re-partitioning /
I tried to install a new instance but it doesn't let me configure the disc and it just goes and install the OS.
How can I use the good old installation options etc?
What happened to control? This became a control nightmare.
View 2 Replies
View Related
Sep 19, 2010
I've had apache installed for a couple of years with no problem but this morning I thought I would change the apache document root to my secondary disk so that my WAMP setup in my Windows partition and LAMP could share the same files. I've edited the etc/apache2/sites-available file to point it to the new location of my document root but I am getting a 403 - forbidden "You don't have permission to access / on this server." error when I try to load files through the browser. I'm not sure if this is a permissions issue or the way I've edited the sites-available config.
Here is the new sites available config:
Code:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /media/Data/webroot
<Directory />
Options FollowSymLinks
AllowOverride None .....
View 5 Replies
View Related
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
View Related
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
Feb 9, 2011
I have set up apache on Centos 5.5 and am struggling with vhosts set up.With the config I have set apache will correctly serve sites with a document root of
/var/www/html/home/myuser/public_html
but not /home/myuser/projects > ls -al
shows public_html and projects as having identical permissions (755)
View 11 Replies
View Related
Mar 25, 2010
I know that I can use the Redirect directive in apache to redirect users to another domain with "Redirect permanent / http://www.newdomain.tld", but when I use that line the entire URL is preserved.
For example, if a user tries to access [url] they will be redirected to [url]. Is it possible to redirect all requests to the root of the new domain [url]?
View 3 Replies
View Related
Jun 20, 2011
I've set my document root directory in httpd.conf to the directory I want to serve files out of, and set Options to Indexes FollowSymLinks; I've saved the configuration file and restarted apache, yet when I direct my browser to the domain name that's seated there, I can't get at my index.html which exists there. It serves index.html when it exists in the natural document root.
View 8 Replies
View Related
Mar 18, 2010
how can I run CGI scripts that are without extensions under the document root?i can not use ScriptAlias on the document root, i can run .pl scripts but i cant run any script without extension...ofcourse all files are executable on the fs.
View 8 Replies
View Related
May 21, 2009
I have a VPS (Mosso Cloud Server) that is administered and monitored by Platinum Server Mgmt. I have CentOS 5 and Apache 2.2 installed.I requested that my Document Root be set to /var/www/JPDemole.com/ and also a subdomain setup to /var/www/test.JPDemole.com/
They responded by telling me that it would, "[This would] cause a problem with the permissions and that it will be a permissions conflict if you set them to /var/www/. For security and compatibility purposes, they should be in /home/username/.... It can be put anywhere in there."
This is the first time I've been involved with any server administration, but while coding on numerous private vps's before, they had a setup similar to what I was requesting.Am I incorrect in my understanding of the previous situations and the Mgmt company is in fact correct?
View 5 Replies
View Related
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
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
Jun 24, 2010
We have installed apache 2.2.15 webserver on A rhel 5 Linux 64 box using the user wwwadm group www
We can start the webserver using root and it works fine but we dont have root access forever so we want the wwwadm user to have all the rights and we can start/stop/restart the Apache server using this wwwadm user.
View 1 Replies
View Related
Sep 9, 2009
I'm now configuring my web server to server different Virtual Hosts based on DNS name. Right now I store my files in /var/www per the default installation settings in Apache.
Questions:
I want to change the Document Root to /home/username/public_html/example1.dyndns.org for the second virtual server. What do the permissions need to be in order for Apache to read the files in this location? Would it be best to force Apache to run as this new username instead of www-data?
My Virtual host setup will look something like this
I want to change the DocumentRoot as I am running a chrooted ProFTPd server and want to be able to update webserver files via FTP. I am running Ubuntu 8.04 LTS Server (CLI only).
View 5 Replies
View Related
Feb 18, 2010
I have been tasked with sending a kill -s SIGHUP (a reload) to a Daemon process owned by root running on a centOS 5.4 machine.
Obviously, Apache cannot normally do this, so I'm going to have to use the sudoers file.
My problem is, how do I allow the Apache user to only run the kill command? nothing else.
in testing, I've gotten Apache to basically run every command prefixed with sudo and no password prompting. But I want the added security to only run the kill command without the password being prompted everything else should prompt for a password.
I'm trying to understand the sudoers file, and i must say, its non-trivial.
is there a simple 1 line I can put in the sudoers file like
PHP Code:
apache ALL=(ALL) NOPASSWD: /bin/kill
View 6 Replies
View Related
Mar 19, 2010
I want to change the DocumentRoot on my Apache httpd server.
I have Changed it from the default to var/www/projects
but its not working.
[CODE]
### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
[Code].....
View 178 Replies
View Related
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
Jul 17, 2010
I have written a simple perl program to add a command to iptables. Here is my code :
Code:
#! /usr/bin/perl
print "Content-type: text/html
";
system("iptables -A FORWARD -s 192.168.0.2 -j DROP");
I put this file in cgi-bin folder of Apache server. Here is my problem : when I run this file with shell as root user it makes change to iptables, but when I use my browser to run this file, it doesn't make any change. I'm sure this is because Apache doesn't have permission to manipulate iptables. How can I start Apache as a user with root privileges ?
View 8 Replies
View Related
Feb 2, 2011
I need to redirect through a .htaccess file in my root folder. The redirect needs to be done from http://www.department.univeristy.edu/reuir to a different server [url]. I am having trouble in determining the pattern that is required for it to take effect.
View 2 Replies
View Related