Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi
I’m trying to follow along with this guide How To Set Up mod_rewrite for Apache on Ubuntu 14.04
I get to ‘Step 3 — Setting Up .htaccess’
I run this command
sudo nano /etc/apache2/sites-enabled/000-default.conf
Which opens 000-default.conf
The guide says
Inside that file, you will find the <VirtualHost *:80> block on line 1. Inside of that block, add the following block:
/etc/apache2/sites-available/default
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
The guide then says
Your file should now match the following. Make sure that all blocks are properly indented.
and it shows this code:
/etc/apache2/sites-available/default
<VirtualHost *:80>
<Directory /var/www/html>
. . .
</Directory>
. . .
</VirtualHost>
The instruction in the previous step says put all the code inside the the <VirtualHost *:80> block. Yet the example shows part of the code /etc/apache2/sites-available/default is outside the <VirtualHost *:80> block.
Confused?
After following the guide, 000-default.conf looks like this:
<VirtualHost *:80>
/etc/apache2/sites-available/default
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Restart the server with this: sudo service apache2 restart
I get an error message, plus my website shows a 500 internal error:
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
Not sure what that means, but I’m pretty sure the text I saved in 000-default.conf is wrong.
If I delete this and restart the server, no error message and I can access my website:
/etc/apache2/sites-available/default
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
What am I doing wrong?
56bd8300516443db8f6e925c6721b4
affiliatetrading
admin
saeeddarabi
djanym
skeddtemp
gebelo
martinjameslynn
Brenda Morales
d02e0b7b59c2429cb46fcbb782