Server :: Configuring Php For Virtualhosts In Apache
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.
I've been for a while trying to configure my apache to host 5 domains as virtualhosts in the same IP address, but seems that neither one makes it through... it always takes first one, because it is the default:
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.
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"
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...
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
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?
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.
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.
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
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
I am trying to solve a problem where Apache stats aren't displaying correctly in Munin. I've ran through quite a bit of checks and tests regarding Munin setup, but I think my issue is related to Apache, but my skill set there is lacking.
first, system info: monitored server: CentOS 5.3 2.6.18-128.1.1.el5
I am upgrading my server and I have a lot of sites. Since I cannot take my server down for a few days, maybe a week until I manage to migrate all the sites to the new machine, I figured I could migrate them one by one. After migrating one, I would somehow tunnel the requests of that name virtual host to my internal machine. When everything is migrated, I would then switch the machines, update ip's and stuff and everything will work just fine.
However I cannot seem to find a way to do this tunneling. is this at all possible? If not, what alternatives do I have?
I am new with Linux but really be interested in it. I would like to ask that if it is possible to make each VirtualHost only controllable by a specific and different user? If so, how to?
I'm a bit of a Nooob to Virtual hosting. On my internal network 192.168.1.x I have a dns server running bind9 My DNS / web server is 192.168.1.3 I have succeeded in getting [URL] to resolve and it goes to my web page in /var/www/ Now I want to get say [URL] to go to /var/www/music/
1. What's the best way to go about this? 2. Can I configure it using webmin or do I just do it the old fashioned way through a terminal? 3. I tried virtual hosts via the following method
Added to /etc/apache2/sites-available/default NameVirtualHost 192.168.1.3:80 Then created /etc/apache2/sites-available/music.7rocks.com <VirtualHost 192.168.1.3:80> ServerName music.7rocks.com ServerAlias music.7rocks.com
i want to configure an Open LDAP server in Ubuntu....and also want it to connect to its clients, i have two machines for testing,one for client & one for server, i followed the tutorials on ubuntu documentation,but did not succeed in making either the client or the server,
I would like to install and configure Transparent squid proxy on a gateway server ,but i dont have a local OR intranet DNS server.I am facing issues do that ,regard .My IP series is 192.168.1.1/24
I'm trying to configure Postfix with a mail server that I programmed in C. The main.cf is set in this way :
Code: relayhost = [myMailServer.localhost] smtp_sasl_auth_enable = no smtp_use_tls = no disable_dns_lookups=yes smtp_never_send_ehlo = yes code....
I don't know why it doesn't receive response after HELO. In fact if I debug my mail server with gdb, I can see it sends a 250 response code. Moreover, I've tested my server both with traditional mail clients, as Thunderbird, and through telnet session and it works very well.
especially to ubuntu server 8.04 because it doesnt use a GUI. Now my question is on how to insert IP address in configuring DNS server using bind9. Actually i'm using this guideBut i m not sure on how to insert IP addresses on the primary master and secondary master. Should I insert the Ip address that i found when i type ifconfig ? or Should I assign a new IP address.I have set up a webserver, DNS server, File server and mail server on a virtual box. For now, at first, im working with the DNS server or should I work with the web server first?what should I do?
I am installing Big Brother on a CentOS 5.2 running the default Apache 2.2.3. When I try to access any web page I get the following error: Forbidden You don't have permission to access /bb/ on this server. Apache/2.2.3 (CentOS) Server at fmsubbnix Port 80 So far I have:
1) Set the Directory options to FollowSymLinks 2) Verified all directory and file permissions are at 755 3) Set permissions temporarily to 777 and received same error so I am assuming the issue is in a config file somewhere 4) in hhtpd.conf verified <Files ~ "^.ht"> is correct 5) verified the "default" directory is correct (/var/www/html)
I have read and tried several ideas in posts listed on the web but to no avail and am at a loss as to what to look for next..
I have a problem configuring a RAID server under Ubuntu 9.10 (kernel 2.6.31.17) with mdadm (v2.6.7.1). First I had some hardware issues that finally got solved by using another motherboard. Now I am dealing with the software part.In order to ease things, I am trying to configure a RAID 5 with three partitions in one disk. I have two HD's, one IDE where the OS lies (recognized as sda), and another where I intend to build the RAID (recognized as sdb). In this second drive I have made three partitions (sdb1, sdb2 & sdb3) of the same size.I've already re-installed Ubuntu 9.10 a couple of times, zeroed the superblocks of the partitions, repartitioned the disks with different partition sizes (I am using 5 GB partitions to save time). I've gone through this process several times, and I really don't know how to move forward now. If RAID is about trust and reliability, this is exactly what I'm not able to get.
I'm running a linux cloud server with the following config 1.2ghz Processor allocation 752MB Ram
The site loads slow and clicking a link almost freezes the page for a second. Also, the page loads could be much faster. We've been running mysqltuner and have pretty much optimized all slow queries. Is there anything we can do to fine tune the server for faster and more responsive?
I have created a FTP server on CentOS then i stop the anonymous..
FTP:192.168.5.100 User A and password User B and password Client 1:192.168.5.101 ( Windows 7 )
ftp permanent setup from 192.168.5.100.i should able access User A and User B home diretories from Client 1 both the folders should be different.is it possible ?but i tried it is showing both folders same contents.
I would like to install a subversion server on my Mandriva system, and I was wondering if there are any configuration GUIs out there to help me set it up. Does anyone know of anything out there for this purpose? I found a beta version of a Webmin module that is supposed to provide SVN configuration capabilities, but I can't get it to work (module located here).
Note that I'm not looking for a GUI SVN client like TortoiseSVN, kdesvn, RabbitVCS, RapidSVN, etc. I plan on using such a client to checkout and commit things to the server, but first I need to set up and configure it.