Programming :: Hosting Cp - How To Control Apache2 Via Php
Apr 23, 2011
**Forenote** i HAVE posted the other threads with the same intro of "hosting cp - " for the subject. I am attempting to create a web based hosting control panel and i figured that it would be easier & less confusing to post each different issue in a different thread so that answers to several differant problems weren't getting mixed up together. Ok, so as i said i'm building a hosting control panel and i need to figure out how to make my software control the functions of apache2. like setting up virtual hosts, sub domains, domains, etc.
if anyone can direct me to some good articles on interfacing with apache, or some open source projects that i could try to reverse engineer, that would be great. ive tried searching google, but i couldnt really find anything that really explained what i am trying to do. probably because most people usually dont try to use php to control apache as a weekend project, or a task to pass the time.
I'm new to this forum and to linux and I love it however I'm having small trouble with setting up my Apache2 web server to host my website. the main problem I'm having right now is that when I browse to my website it keep going to the default Apache page and not my website pages.
here is my virtual host setup: these are two separate file in the sites-available folder
I have no understanding on DNS setup and how it works so I'm a complete novice. SECOND question do i have to setup any sort of dns setting from my Linux server or has yahoo covered it for me already?
I'm completely new to this whole hosting on linux thing. I'm using apache2 and have everything setup as if I was doing it on a windows machine but when I navigate to the site via URL it displays the source code as plan text and thats all I see. I'm running openSuse 10.3.
I am trying add three namebased virtual hosts in local apache2 webserver OS ubuntu 10.10. The three sites are :www.site1.eka,www.site2.eka,www.site2.eka
The first I created a file is virtual.conf in conf.d directory its content is : # we're running multiple virtual hosts. # NameVirtualHost *:80
Next I created following files in sites-available directory. [URL] is as follows: #site1.eka (/etc/apache2/sites-available/www.site1.eka) <VirtualHost *:80> ServerAdmin webmaster@site1.eka ServerName www.site1.eka ServerAlias site1.eka .....
When I visit the [URL] in browser it says server not found.
I have some problem in apache2 configuration. I have two websites on same IP on LAN.i.e. 192.168.1.5
[Code]...
What should I check in a few blogs I checked they said to mention in [URL]...But in this case what should I put I have two different websites or what other thing I have missed? I do not have access to DNS so that on LAN I can point site1.abc.com and abc.com to same IP 192.168.1.5 which to me seems could resolve the issue.
What would you recommend as the Base OS for a server to run a Web Hosting and a VPS kind of set up?I'm particularly big on CentOS and would like to know how users who have worked with it in data centers have fared with it in all aspects.Will be interested to know too whether taking BSD systems - FreeBSD or OpenBSD has any advantages and which of these to choose.On control panels - what is the best Open Source Control panels to manage:
i,Web hosting on *nix environment ii,VPS accounts
I have always come across ISPConfig on my searches but I don't know how it rates with the end users.Fill me on this please.Has anyone of you used/using other cost friendly commercial Control Panels which are robust and have full capability and come as alternatives to CPANEL?
I want to set up a hosting control panel solution on my Ubuntu LAMP server to make it easier to administer virtual hosts, users, databases, and so on. I'm completely disgusted with how drastically the installation seems to alter your system (I highly doubt it even works at all with Debian/Ubuntu).
I'd actually prefer something that was more than JUST a web hosting manager, but that gave me options for managing my server in general. What control panel option would you recommend?
Most importantly, I want something that's going to work well with the Apache config standards that are unique to Debian/Ubuntu and won't require a PhD to setup. I really like the default Apache/PHP stack in Ubuntu. Of course I'm particularly interested in Open Source solutions. The new OpenPanel project sounds really exciting, and I've heard lots of people talking about Webmin. Others I've heard good things about include VHCS, ispCP, and ISPConfig.
I am trying to install Google Sitemap Generator at server. I am getting the following errors:
Quote:
This installation updates the Apache configuration file. To find that file,the installer needs the location of the Apache binary (httpd) or control script (apachectl). The binary or control script that you specify must support the -V option. What is the location of the Apache binary or control script? [/usr/sbin/apache2] Can't determine Group directive for Apache. /usr/sbin/apache2 is not a supported Apache binary or control script. Do you want to enter a different location for the Apache binary or control script? [Y/n]n The Google Sitemap Generator installation has been aborted.
I have designed name based virtual hosting in apache. as of now,I am able to access website using IP also. which is I am looking to block, only can access by the name
[URL] Essentially, this module can be fine-tuned to the user's liking, using four integers instead of a boolean. By allowing for the red, green, blue, and alpha values to be fine-tuned, the user can control how transparent or opaque their desktop is. And how is this possible? C++ instead of C. How do you guys think of being able to customize RGBA?
With the command "tail -300 /var/log/apache2/access.log | less" i can look in the log for the 300 latest visitors. and i wanted to ask if it's possiblle to get that command to run from a php file and if yes how ?
I didn't know exactly where to put this, but here it goes:For the record, I have Apache2 on Ubuntu.OK so I have a "svn" subdomain for SVN repositories. The repositories are actual separate repositories, not a big one for all. So I'm using SVNPath not SVNParentPath (please don't suggest this as a possible fix).
The problem is I want to be able to list the repositories (or even put a blank page for that matter) at svn.mydomain.com. All repositories have a svn.mydomain.com/myrepository path with a VirtualHost for each. So when I create another VirtualHost just for the / path, it overrides all the SVN VirtualHosts, as it covers / and all sub-directories.
I would like a way to set that VirtualHost to affect just the root directory, without the sub-directories. Or to make the SVN VirtualHosts override it. Either way, is this possible? What approach should I take? Thanks!
I have suse10 64 bit installed. I am setting up a svn server on it. After installation and adding the modules ,while reloading the apache2 it's throwing the error as: HTML Code: httpd2-prefork: Syntax error on line 113 of /etc/apache2/httpd.conf: Syntax error on line 31 of /etc/apache2/sysconfig.d/loadmodule.conf: Cannot load /usr/lib64/apache2/mod_dav_svn.so into server: /usr/lib64/libsvn_subr-1.so.0: undefined symbol: apr_memcache_add_server
Starting web server: apache2[Wed Dec 09 15:36:40 2009] [warn] NameVirtualHost XX.XX.XX.XXX:80 has no VirtualHosts(99)Cannot assign requested address: make_sock: could not bind to address 68.178.232.100:80 no listening sockets available, shutting down Unable to open logs failed!
I'm unable to configure the apache2 with python support. I have done the configuration in the following method, but unable to start the python cgi support: I have installed the libapache2-mod-python it has installed python.load in the mods-available directory. In the apache2/sites-available/default file, I have added the following lines.
[code]...
when I request for a python script in the py folder. I get a 404 Not found error.
I'm working on my ncurses application, written in C. I get user input through a loop which uses getchar(). I was able to recognize Ctrl-n by comparing the keypress to ASCII character 16, and this seems to work fine. However, if I noticed that the ASCII character for Ctrl-j (10) is the same as the Line Feed. I tested this, and if I press enter on the keyboard I get the same ASCII value as when I press Ctrl-j.
So, what do I do if I want Ctrl-j to mean something different in my program than pressing enter?The ncurses terminal mode is set to raw, with a 100 millisecond timeout, and keypad is on (I'm already using the up and down arrow-keys).
I'm using expect to log into a remote server and run a script. I want to able to have expect edit the output from that script, on the remote server, in VI. Has anyone ever done this before, it seems as though the expect interpreter has nothing to expect once VI is started, the file pointer starts at the beginning of the line, and expect usually reads the characters before the pointer.
I have suse10 64bit and I was setting up SVN server on it. After all required setup while reloading apache2,its giving the error:
Code:
httpd2-prefork: Syntax error on line 113 of /etc/apache2/httpd.conf: Syntax error on line 31 of /etc/apache2/sysconfig.d/loadmodule.conf: Cannot load /usr/lib64/apache2/mod_dav_svn.so into server: /usr/lib64/libsvn_subr-1.so.0: undefined symbol: apr_memcache_add_server
I've just started using gdb at my new job, and I'm having a small issue debugging C++ with it. After I execute "continue" or "run" through gdb, I'm not able to return control to gdb. Based on the documentation I read, I should be able to use Control-C to interrupt the program, and have control return to gdb.
This does not work on my setup. Not sure if it's related, but I'm debugging on a remote machine. I tried through PuTTY and xterm using Exceed XServer. In both cases, gdb does not respond to Control-C. This is quite annoying because I have to restart my program every time I want to set a breakpoint.
I have a set of files to copy and decompress, and want to do these operations concurrently with a script.
Manually it would be something like:
Code:
The single & is intended to background the processes, while the && is intended to execute the gzip process if and only if the cp completes successfully.
My script is:
Code:
When I run it, bash gets angry with the following error:
I'm having this problem with this piece of code, and i don't really get what the problem is, maybe is because i am already too sleepy to concentrate enough but maybe
I have a java application running under Linux (Suse). My application communicates with a windows service via TCP/IP. I had multiple cases where the windows service crashed and I'm wondering if in such case there is any Linux or java tool I could use to remotely restart this Windows service.
I need to control daemons like dhcp/bind from within a perl script. I could run the script as root to restart/stop/start the daemons however, this is not good for security.
What are the ways of controlling processes within perl as different users?
2. for I in 1 2 3 4 5 6 7 8 9 10; do echo $I; done|
3. for I in $(seq 1 10); do echo $I; done|
4. for ((I=1; I <= 10 ; I++)); do echo $I; done
I have a script which uses the 1st form of for loop. I'm trying to modify it to use a variable instead of a static hard-coded value in the section that controls the looping.of the for loop.
I've tried all different ways of quoting and escaping the variable, and the problem is that the quoting chars and escape char are being translated and passed into the loop along with the value stored in the variable.
For example, to change the start value of 1 to whatever value I want passed in through a variable:
Change:
I have tried: {{$a}..10} and {`$a`..10}, to have the variable evaluated first.
I have tried using the eval() function.
I have tried single and double quotes and the backslash escape character.
Nothing I've tried works. It's probably a syntax error.
Do you know how to write a shell script that executes say 4 instances of the same program in different directories at the same time, and once ONE instance completes it executes a new instance of that program in a new directoryd so on, until 100 instances have been executed, each in their own directory
I would like to use my multimedia keys on the laptop.
As I have seen in kde, they are recognized already, very good.
But I would like to use the play-pause, ffd, rwd and stop button in a special way.
After pressing one of them , a programm or script is called, which does:
a) determine the entries ( in a list ) of assigned applications to be controlles by this mm-buttons. ( The list can be edited, I decide to add vlc, amarok, flash plugin for firefox )
b) determine, which of the applications are running actually.
c) determine, which of this applications has the focus ( means, which of them ( if all more running ) is "the active one".
d) issue its shell command, which corresponds to the keyhit ( play, pause, fwd, rwd, stop )
Now my question : Is it all possible via shell/and or x-script?