Question
host more than one insstance on apache
I have ubuntu 14.04 LTS server with an LAMP stack on. it is hosting Owncloud right now but i also want to host wordpress on it.
right now i can acces my owncloud service at https://82.180.xx.xxx/owncloud and i would like to acces my wordpress at 82.180.xx.xxx/wordpress
i have installed wordpress to the /var/www foler as /var/www/wordpress but when i am trying to acces wordpress i am getting an 404 not found. and i dosnt matter if it is local ip or external ip
i have been following this guide https://www.digitalocean.com/communi…n-ubuntu-14-04 for installing wordpress.i changed installation path to var/www/wordpress
but when i am trying to acces the 82.180.xx.xxx/wordpress it says 404 not found and :
Not Found
The requested URL /wordpress was not found on this server.
Apache/2.4.7 (Ubuntu) Server at 82.180.xx.xxx Port 80
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
Are you sure you need it in /var/www and not in /var/www/html?
Could you share your Apache configuration? Usually
/etc/apache2/sites-enabled/000-default.conf
When you changed the location that you installed WordPress to, did you also modify the ApacheDocumentRoot
accordingly?i have tried both options :S
<VirtualHost *:80>
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 ${APACHELOGDIR}/error.log
CustomLog ${APACHELOGDIR}/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
The solution was to change the Documentroot and then restart Apache!
a restart did it