How can I keep Apache stopped on Ubuntu? [closed] - apache

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Actually, I want something like WAMP (for Windows). The Apache service should be always stopped. Whenever I need it to be running, I go to the Start Menu and turn it on. Is there a way to make it possible on Ubuntu?

Remove apache "autostart" from runlevels with the following:
sudo update-rc.d apache2 remove
Make a script with the following:
#!/bin/bash
gksudo /etc/init.d/apache2 start
Make it runnable
chmod 0755 apache-starter-shell-script-name
And run it when you want to start apache.

I think this is more a serverfault.com question.
Nevertheless you could modify your runlevel configuration (Ubuntu uses upstart instead of init) and then start apache manually from the console when you need it.
Unfortunately I don't know the upstart configuration options by mind but I think some googling for it's configuration should help you.
Edit: Maybe Boot-Up Manager is what you need (http://www.marzocca.net/linux/bum.html) - I don't use Ubuntu as desktop.
Edit2: Try
sudo update-rc.d apache2 disable

Related

How can i configure a http proxy for apt-get? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have a raspberry pi with raspbian. I have to use a http proxy now, but where can I configure the proxy?
It seems the apt-get ignores the http_proxy, which I defined like this:
export http_proxy="http://username:password#host:port/"
I managed to solve it in the following way. Go to the following folder:
cd /etc/apt/apt.conf.d
Create a file named 10proxy:
sudo nano 10proxy
Without authentication add the following line:
Acquire::http::Proxy "http://yourproxyaddress:proxyport/";
With authentication:
Acquire::http::Proxy "http://username:password#yourproxyaddress:proxyport/";
The /at the very end was important. Without it it did not work.
If you run apt-get with sudo you have to modify /etc/sudoers and append
Defaults env_keep = "http_proxy https_proxy ftp_proxy"
you can edit it by calling visudo.
You could also use su, set the proxy and then run apt-get

How can I change host Name for Apache tomcat server? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I installed Apache Tomcat 6.0,I tested with simple Application it's working fine.but every time I calling my app with localhost:8080 in the browser.
I want to change host name(localhost) to something like subbu.for this I tried in the following way.
I open command prompt and entered drivers and after selected etc folder, open host file .in this file I changed subbu instead of localhost.After did this I restarted my system and started apache server and entered in my browser like subbu:8080.it's not working.
I hope,you understand what I faced problem.
How can I resolve this.
In /etc/hosts change the line
127.0.0.1 localhost
to be
127.0.0.1 localhost subbu

SSHing in to EC2 Ubuntu instance with user ubuntu tells me to login as ubuntu [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm having an issue where I try to SSH into my API server (EC2 instance running Ubuntu). I've been SSH'ing in just fine for the past few weeks, but I suspect I messed something up because now it tells me to login as user ubuntu (I am!) :
% ssh ubuntu#ec2-50-17-143-255.compute-1.amazonaws.com -i ~/dev/key.pem
Please login as the user "ubuntu" rather than the user "root".
Is there something I could have done to mess with the ubuntu user? Is there anyway to resolve this without having to save the AMI and boot up a new instance?
Please use ssh -v ... or ssh -vv ... to see what is going on.
In your case it looks like you copied ~root/.ssh/authorized_keys to ~ubuntu/.ssh/.
According to this, the root account is configured to reject logins with this message using the authorized_keys file. If you copied this file, now the user ubuntu will reject logins with this key, too...

How to install/configure mod_reqtimeout in Apache [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I need to configure mod_reqtimeout in my Apache server v2.2.22 (in a linux machine). Problem is, I have absolutely no clue on how to do it.
I checked the Apache site on this module at this link but there was no download/configuration details given.
Can someone help me on this ? Any help is much appreciated. Basically,
Is there something needed to download ?
If not, which files do I need to edit and how?
It's a standard Apache module from 2.2.15 and later, but is apparently missing in some distro versions (e.g. Ubuntu, FreeBSD).
First, check that mod_reqtimeout exists (e.g. look in apache2/modules/ or - depending on your system - do something like /usr/sbin/httpd -l | grep mod_reqtimeout). Second, if it is, make sure it's enabled in your Apache config.
mod_reqtimeout is available from GitHub (also see the RPM resource). Finally, this thread has some useful tips. BTW FYI I don't think it can be enabled in an .htaccess file.

Crontab - Restart apache every 3 hours [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
My server is currently suffering from some problems due to visitors lag and i think the best solution for it, is to restart apache every 2/3 hours or so
How can i do this through cronjob ?
Why do you want to do this?If you are experiencing a specific problem with Apache.It Will definitely be more beneficial for you to have a look into the access/error logs, and make adjustments accordingly.Give us some more information and we can look into your logs and give you a more appropriate solution.
None the less heres the cron to restart apache.
0 */3 * * */ root/restart_apache > /dev/null 2>&1
/etc/init.d/httpd restart
I can almost guarantee this 'fix' will not address your real issue. Why not post your Http.conf settings and a little info on your server resources (memory, cpus) and we might help fix your config issues.
Instead of adding to the crontab of an individual user (root), I would add hacks like this to /etc/cron.d.
Change 'apache2' to whatever the init script is on debian.
echo '* */3 * * * root /etc/init.d/apache2 restart 2>&1 >/dev/null' > /etc/cron.d/apachesux