Questions tagged [apache2]

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

Filter by
Sorted by
Tagged with
51
votes
2answers
135k views

Where to place my local website starting with the 2.4.7 version of apache2?

I recently installed Ubuntu 14.04, then I installed lamp-server and placed my webpages in /var/www directory, but when I opened localhost in the browser there was nothing. I think that happened ...
54
votes
6answers
248k views

PHP script not executing on Apache server

I have just reinstalled Apache and PHP5 but when I visit my doc root it just downloads a "download" file. And when I try documentroot/index.php it just downloads the PHP file. I have PHP installed ...
435
votes
14answers
1.4m views

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 ...
67
votes
2answers
50k views

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 ...
13
votes
2answers
25k views

How to set a domain to ip address?

You can reach this IP address 2.186.116.46 (if my computer is online). I want to assign a domain to it so I wonder how is that possible when I have no DNS? I do own my domain which is ".com". My IP is ...
6
votes
1answer
2k views

WordPress Installation Failed

I am trying to install Wordpress on Lubuntu. I followed the instructions here. Including PHP Apache and MySQL setups. Apache and MySQL appear to be running fine. However, when I go to http://...
168
votes
4answers
513k views

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

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 ...
1
vote
1answer
3k views

When does Ubuntu 16.04 use /etc/apache2/ssl/apache.crt?

I have some Ubuntu 16.04 server running and set up one vhost in apache2 which uses (or should use) ssl. <IfModule mod_ssl.c> <VirtualHost *:443> ServerAdmin myemail@...
19
votes
4answers
40k views

PHP rendered as text after Ubuntu 16.04 upgrade

Apache is rendering PHP files as text after Ubuntu 16.04 upgrade. Apache is installed and running. PHP7 is running. When I execute the following command I get the correct output: php -r 'echo "\n\...
9
votes
3answers
57k views

Forbidden 403 error when trying to access Apache 2.4.7 web server in browser

When I access Apache web server using localhost from same web server PC, it shows Apache2 Ubuntu default page. But when I access Apache web server using 192.168.0.2, it is giving 403 Forbidden error ...
34
votes
4answers
54k views

403 error after upgrading to apache2.4

After upgrading from Ubuntu 13.04 server, the www pages won't display themselves. Error 403 Forbidden You don't have permission to access / on this server. I've changed access control saves from ...
2
votes
1answer
389 views

Creating additional virtual host Ubuntu Server 16.04.3

I have currently one website running perfectly on my LAMP server (Ubuntu Server 16.04.3). I now would like to add another one to the server. So i first went to the /etc/apache2/sites-available file ...
111
votes
6answers
558k views

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? ...
53
votes
2answers
281k views

Can't install php5 on Ubuntu 16.04

so I've recently installed my first Ubuntu, to be precise, a daily build of 16.04, on my new laptop since the hardware was to new for 15.10. Now I'm in the process of setting it up and I want to ...
10
votes
2answers
4k views

I need rules to drop some malicious Apache connection

I drop all traffic on ports except on 80 for my web server. I have some rules like this on iptables: iptables -A INPUT -p tcp -m tcp --dport 80 -m string --string "cgi" --algo bm --to 1000 -j DROP ...
142
votes
9answers
315k views

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 ...
41
votes
4answers
152k views

Correct permissions for /var/www and wordpress

I have set up a LAMP server and I have access via SSH and to the "it works" page from a web browser from inside my network (via ip address) and from outside using dyndns. We have some Wordpress ...
36
votes
4answers
164k views

default permissions for /var/www

I was trying to open a file and write to it with PHP at /var/wwwfolder but it wasn't working so I did sudo chmod 777 /var/www now I want to set the permissions for /var/www to the default. what are ...
38
votes
4answers
102k views

How can I reinstall Apache HTTPD after deleting some of the configuration files?

I recently was messing around with my Apache config and wanted to reinstall so I could start from fresh. I followed some forum posts about reinstalling the apache2 package and this ended up deleting ...
11
votes
4answers
12k views

Install Apache, Php, Mysql latest versions not available via apt

I need to install the latest versions of apache, php and mysql that are available on their websites, but the problem is that apt repositories don't have these updates versions yet. Versions that I ...
14
votes
4answers
32k views

Cannot start XAMPP on Ubuntu 11.10

When I try to start XAMPP with sudo /opt/lampp/lampp start command it gives me a message like this. Starting XAMPP for Linux 1.7.7... XAMPP: Another web server daemon with SSL is already running. ...
2
votes
1answer
150 views

Redirect people after SSL is set up

how do I set up the auto redirect with apache2. I have got SSL working and want to redirect all to the SSL side. I added Redirect / https://fraffel.tech/ but takes me to the wrong site directory ...
171
votes
5answers
687k views

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 ...
76
votes
12answers
176k views

How to have two versions of PHP installed and switch easily between them?

I want to have both PHP 5.2.17 and PHP 5.3.5 installed on my Ubuntu machine and switch as per my necessity. How can I achieve this?
27
votes
4answers
214k views

permission denied for root@localhost for ssh connection

I just installed Ubuntu 14.04 and LAMP on that. Then, I wanted to configure my server, so tried out This tutorial. When I give the command: ssh root@localhost I get : Permission denied, please try ...
36
votes
8answers
155k views

Why is my Apache not working after upgrading to Ubuntu 14.04?

[aman@aman-Inspiron-1440:~$ apache2 [Mon Apr 21 17:36:38.019213 2014] [core:warn] [pid 4134] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined [Mon Apr 21 17:36:38.019345 2014] [core:warn] [...
3
votes
1answer
2k views

Let's Encrypt, Apache2 - Editing vhosts properly

What is the proper way to edit /etc/apache2/sites-enabled when there is example.com.conf and example.com-le-ssl.conf? Should I edit both the files when changing something? Or only one and then ...
37
votes
6answers
45k views

how to stop apache2, mysql from starting automatically as computer starts?

My os is 11.04. I have apache2 & mysql installed. How to stop apache2, mysql from starting automatically as computer starts?
1
vote
1answer
2k views

Setting up vhost on VirtualBox with Ubuntu 16.04 [duplicate]

I am pretty new to development and this is why I am stuck at such a "beginners" problem. I want to have a directory under /var/www/mysite with a index.html and access it via web browser on my PC (...
177
votes
4answers
205k views

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.
34
votes
3answers
168k views

Permissions problems with /var/www/html and my own home directory for a website document root

I'm trying to not give 777 permission in my /var/www/html folder, but I want to edit my files without sudo. So I though in create a symlink of a folder in my home directory within /var/www/html. I ...
27
votes
7answers
159k views

Change Apache document root folder to secondary hard drive

I installed the ubuntu 12.04 server edition for my server pc . i had installed lamp server. i need to change the var/www location to my secondary hard disk location. i was configured so many time to ...
4
votes
1answer
4k views

How to secure phpmyadmin

OK, so I have several sites on a vps with ssl certificates. I have mod security setup as well as tripwire. My question then relates to phpmyadmin security. If my IP is 123.123.123.123 I can access ...
5
votes
5answers
10k views

Apache 2 could not bind, address already in use

I installed Apache 2 on Ubuntu 12.10. When I try to start the service using sudo /etc/init.d/apache2 start, I get the following message. *Starting web server apache2 (98)Address already in use: ...
2
votes
2answers
825 views

Horizon: Apache exceptions at import_module

I've deployed Openstack using juju, and everything looks normal except that I cannot browse to openstack-dashboard. I get error 500 Internal Server Error. I looked through apache2 logs at that node ...
251
votes
12answers
1.3m views

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 somehow seems not to work in Ubuntu. :( How do i restart my Apache?
10
votes
3answers
84k views

Apache2 start error when using php5 module ( Ubuntu Server)

I am using Ubuntu Server. When I start apache2 everything is fine, but when enabling php5 module and restarting apache2 I get this error: ERROR: *** Restarting web server apache2 ...
9
votes
2answers
86k views

Apache not starting

So I tried to start my apache2 server with the following command... sudo service apache2 start But then I get this error message... Job for apache2.service failed. See "systemctl status apache2....
5
votes
2answers
29k views

Change phpMyAdmin port from 80 to another number

How to change phpMyAdmin port from 80 to 99?
71
votes
5answers
378k views

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: ...
69
votes
7answers
201k views

Upgrade to 16.04. php7 not working in browser

I just upgraded from 14.10 to 16.04 and am not sure how to configure PHP 7 in apache. I did modify the php7.0.conf file to uncomment that last lines, restarted apache2 and no change. Do I need to ...
39
votes
1answer
138k views

setting up subdomain on ubuntu server

I have a server at mysite.no-ip.org. Everything is working fine and I have a blog and owncloud that I access writing mysite.no-ip.org/blog and mysite.no-ip.org/owncloud. Now, I want to create ...
71
votes
11answers
451k views

Apache not able to restart

Trying to restart apache from terminal using following command: sudo service apache2 restart when executing that command getting below error: Job for apache2.service failed. See "systemctl status ...
17
votes
1answer
250k views

Apache2: Forbidden You don't have permission to access /dir/ on this server

I can access localhost but not the sub directories index.html My default conf looks like: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www <Directory /> ...
21
votes
2answers
200k views

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? [duplicate]

I am using ubuntu 13.10 on evaluation board and my internet is not working. Also i need to install softwares and apt-get install is also not working. Terminal says : E: Unable to fetch some archives,...
37
votes
2answers
80k views

Upgraded to Ubuntu 13.10 - Apache not able to start

I updated to Ubuntu 13.10 (from Ubuntu 13.04) last weekend, and now Apache is not being able to start. It was working perfectly well until the upgraded, and I haven't changed anything myself. When I ...
15
votes
5answers
28k views

Apache symlinked to home directory - Permission Errors

im having a few problems symlinking my /var/www/ to a new Webroot directory inside my home folder. I think these stem from my lack of understanding of linux permissions. As far as im aware, symlinks ...
11
votes
1answer
43k views

Easy way to change apache www location

Instead of changing permissions to /var/www, installing nautilus permission related extensions or having to execute gksu i want to know an easy to do way of changing /var/www to another place like /...
6
votes
4answers
102k views

Apache2 restart failed in Ubuntu 16.04

I am trying to use domain for my localhost instead of localhost or 127.0.0.1 I have added a configuration file myconfig.conf in sites-availbale I also have enabled it using sudo a2ensite myconfig....
11
votes
4answers
91k views

How to add custom directory e.g. phpmyadmin?

As my knowledge about apache is minimal. I'd like to let it grow so I'd have more experience with LAMP. My hot question for today is: How to add custom directory to webserver? (e.g. phpmyadmin)? My ...