Questions tagged [apache2]

Use this tag for question related to configuring and using Apache on Ubuntu or one of Ubuntu's official derivatives.

The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.
The Apache HTTP Server is a project of The Apache Software Foundation.ref


Apache HTTP server can be installed using apt-get.
Or, another common method of installing Apache is by using taskel and setting up a lamp stack.

Links

4520 questions
513
votes
14 answers

Apache error "Could not reliably determine the server's fully qualified domain name"

When I restart my Apache server using the command sudo /etc/init.d/apache2 restart I get the following error: Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for…
Deepu
  • 5,277
  • 4
  • 14
  • 10
313
votes
13 answers

How do you restart Apache?

I switched from SLES to Ubuntu and now I want to restart my local server. In SLES I used: rcapache2 restart but this seems not to work in Ubuntu. How do I restart Apache?
Jai Puri
  • 3,929
  • 3
  • 20
  • 10
295
votes
5 answers

Where are the Apache and PHP log files?

I've installed Apache, PHP, and MySQL on Ubuntu 10.10 desktop edition, and it's working fine. Except I have no clue where to look for Apache or PHP log files.
Stann
  • 14,896
  • 17
  • 46
  • 43
257
votes
4 answers

How do I stop Apache2 from automatically starting on boot?

How do I stop Apache2 from automatically starting on boot? I can't seem to find an option that disables the automatic start-up when I turn on the machine.
chip
  • 2,831
  • 4
  • 16
  • 13
210
votes
7 answers

Find the correct php.ini file

I am currently trying to locate the correct php.ini file to edit it and restart apache so the changes will take place and I'm stumped. I have found three different php.ini files (no idea why there are three) this is how I found the files $ sudo…
Michael
  • 2,203
  • 2
  • 13
  • 10
183
votes
9 answers

Permanently removing apache2

It seems a simple apt-get remove apache2 does not completely remove apache2 as I can still see it on one of the processes when running top. How does one remove apache2 completely on his ubuntu server? It's not removed indeed: ~# which…
Jürgen Paul
  • 1,997
  • 5
  • 16
  • 15
182
votes
4 answers

How can I downgrade from PHP 7 to PHP 5.6 on Ubuntu 16.04?

I am trying to revert my PHP version to 5.6 from 7 and though I removed PHP 7 and then installed PHP 5.6 I still seem to be running version 7. Is there a simple method for moving through PHP versions where apache, phpMyAdmin and co are configured…
dibs
  • 3,479
  • 8
  • 27
  • 38
170
votes
2 answers

How to enable mod_rewrite in Apache?

I just installed the LAMP stack on my Ubuntu system. The redirection is not working for me. I don't know how to fix it. Can anyone help me?
vinoth
  • 1,801
  • 2
  • 12
  • 3
154
votes
11 answers

How can I access Apache (on VirtualBox guest) from host?

I installed Apache on an Ubuntu VM. When I go into the guest and load up Firefox I can see that Apache is working fine when I browse to localhost. I would like to access this same page through the host. I've tried using the IP address of the guest…
urok93
  • 1,959
  • 5
  • 18
  • 19
134
votes
12 answers

Apache not able to restart

Trying to restart apache from terminal using the following command: sudo service apache2 restart When executing that command, I'm getting below error: Job for apache2.service failed. See "systemctl status apache2.service" and "journalctl -xe" for…
Gautam Savaliya
  • 2,301
  • 3
  • 14
  • 10
103
votes
6 answers

Apache: access denied because search permissions are missing

I know this question is asked a lot, but the solutions I saw didn't work for me. I only have one virtual host enabled, and I'm trying to enable access to a folder that's not under the document root ServerAdmin webmaster@localhost DocumentRoot…
Yotam
  • 1,309
  • 2
  • 11
  • 13
100
votes
2 answers

Can't find httpd.conf

I have installed Ubuntu 14.04 on a laptop and installed apache 2 (version 2.4.7) and PHP 5. I cannot find httpd.conf. I need to change it because when I try to open a .php page I see a download box. How should I proceed?
fosslinux
  • 3,771
  • 4
  • 28
  • 46
93
votes
5 answers

How to solve the phpmyadmin not found issue after upgrading php and apache?

Recently I have install the PHP, Apache, MySQL, phpMyAdmin, python in my Ubuntu Desktop 12.04.3 LTS to use it as a LAMP server. The commands I used to install these are given below: 1: sudo passwd 2: su 3: apt-get install php5 4: apt-get install…
Farukh
  • 1,053
  • 1
  • 8
  • 12
87
votes
6 answers

How can I chmod 777 all subfolders of /var/www?

I’m running a webserver and FTP server, wherein /var/www is bound to /home/user/www. I set both directories to chmod 777 (which is fine since it’s for testing only). I can upload files into /home/user/www, but whenever I create a new directory, I…
user1645034
  • 1,039
  • 2
  • 10
  • 11
80
votes
2 answers

Why shouldn't /var/www have chmod 777

When developing a page on a localhost, I sometimes get a "Permission denied" error which I can solve by running chmod -R 777 /var/www. However, people are telling me that this is a bad idea for security reasons. Why shouldn't /var/www have a chmod…
Luis Alvarado
  • 209,003
  • 167
  • 543
  • 707
1
2 3
99 100