I got server error when using Bitnami Wordpress - wordpress

I manage 3 websites on one server instance. I set the Bitnami.conf like below
<VirtualHost *:80>
ServerName morethanair.com
ServerAlias morethanair.com
DocumentRoot "/opt/bitnami/apps/wordpress/htdocs"
<Directory "/opt/bitnami/apps/wordpress/htdocs">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
# Bitnami applications installed with a prefix URL (default)
Include "/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf"
</VirtualHost>
<VirtualHost *:80>
ServerName microblog.morethanair.com
DocumentRoot "/opt/bitnami/apps/wordpress/microblog-wordpress/"
<Directory "/opt/bitnami/apps/wordpress/microblog-wordpress/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
# Bitnami applications installed with a prefix URL (default)
Include "/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf"
</VirtualHost>
<VirtualHost *:80>
ServerName photo.morethanair.com
DocumentRoot "/opt/bitnami/apps/wordpress/photo-wordpress/"
<Directory "/opt/bitnami/apps/wordpress/photo-wordpress/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
# Bitnami applications installed with a prefix URL (default)
Include "/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf"
</VirtualHost>
I can connect 2 sites with subdomain (photo.morethanair.com and microblog.morethanair.com), but the server error occurred when I try to connect morethanair.com.
When I type 'morethanair.com' in the browser, the URL changes to 'morethanair.com//' with double slash.
Any idea to resolve this?
I already tried to delete Wordpress and all plug-ins and reinstalled the latest Wordpress, but it didn't work.
Thank you.

Related

DNS error - host not found after enabling site

I get the below error when I try and setup by wordpress site on Apache, beta.xxx.co.uk. Any ideas? I am expecting to see the wordpress setup wizard but just get an error.
I have:
setup my A record in my DNS under my domain (beta).
created my conf file under sites-available
sudo a2ensite beta.xxxx.co.uk.conf
​sudo service apache2 restart
Conf file:
<VirtualHost *:80>
ServerName beta.xxx.co.uk
DocumentRoot /var/www/beta.xxx.co.uk
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/beta.xxx.co.uk/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
Host Not Found
DNS error (the host name of the page you are looking for does not exist) or Server did not accept the connection.
Please check that the host name has been spelled correctly.
all I could find is:
<Directory /var/www/beta.xxx.co.uk/>
should propably be:
<Directory /var/www/beta.xxx.co.uk>
Port 80 & 443 is open?
Regards Tom

editing httpd.conf on apache

I'm trying to make my apache visible on my local network for being able to acces my wordpress site hosted there, by editing httpd.conf file on /bin/apache/conf/ and im getting a Permision Error, but I can't find any clear content on the Internet.
Im using UWAMP 3.1.0 and It must be something related with this part of the code:
<VirtualHost *:80>
#UWAMP Generate Virtual Host
DocumentRoot "F:/UwAmp/www/"
ServerName "main-serveur"
Alias "/mysql/" "F:/UwAmp/phpapps/phpmyadmin/"
Alias "/mysql" "F:/UwAmp/phpapps/phpmyadmin/"
Alias "/uwamp/" "F:/UwAmp/phpapps/uwamp/"
Alias "/uwamp" "F:/UwAmp/phpapps/uwamp/"
<Directory "F:/UwAmp/phpapps/phpmyadmin/">
AllowOverride All
Options FollowSymLinks Includes Indexes
Require local
</Directory>
<Directory "F:/UwAmp/phpapps/uwamp/">
AllowOverride All
Options FollowSymLinks Includes Indexes
Require local
</Directory>
<Directory "F:/UwAmp/www/">
AllowOverride All
Options FollowSymLinks Indexes
Require local
</Directory>
more concretely at the end:
<Directory "F:/UwAmp/www/">
AllowOverride All
Options FollowSymLinks Indexes
Require local
</Directory>
This is what I get after entering the IP where the site is hosted.
sorry for asking something so simple but I'm learning
Thank you in advance
{ONLINE_MODE}
If UwAmp is on Online mode, your website is available for all.
{ONLINE_MODE} will be replaced by :
Order allow,deny
Allow from all
If UwAmp is on Offline mode, your website is available only for your computer.
{ONLINE_MODE} will be replaced by :
Order deny,allow
Allow from 127.0.0.1 localhost

Create website conf with 2 virtual hosts

I want to know if it's possible to have one apache website conf file with two vhost inside ?
More clearly :
For now if I access my website like this : XX.XX.XXX.XX I reach my wordpress folder.
Now, I want to access another folder like this : XX.XX.XXX.XX/interface
Is it possible to do it in the same conf file ?
Here is mine actually :
<VirtualHost *:80>
ServerAdmin webmaster#localhost
DocumentRoot /var/www/wordpress/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/wordpress/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted
</Directory>
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
Thanks in advance

how to set up 2 virtualhosts with the same root adress?

I'd like to set up 2 wordpress sites on the same ip adress, that is ip_adress1/wordpress1 and ip_adress1/wordpress2.
I put these 2 files into /etc/apache2/sites-available (these are basically the same, only site's path changes)
<VirtualHost *:80>
DocumentRoot /usr/share/wordpress/MyFirstSite/
ServerName my.ip.adr.ess
ServerAlias my.ip.adr.ess/MyFirstSite/*
ServerAdmin myemail#adress.ext
Alias /MyFirstSite /usr/share/wordpress/FolderForMyFirstSite
<Directory /usr/share/wordpress/FolderForMyFirstSite>
Options FollowSymLinks MultiViews
Order allow,deny
AllowOverride All
Allow from all
</Directory>
<Directory /usr/share/wordpress/FolderForMyFirstSite/wp-content>
Options FollowSymLinks MultiViews
Order allow,deny
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
and
<VirtualHost *:80>
DocumentRoot /usr/share/wordpress/MySecondSite/
ServerName my.ip.adr.ess
ServerAlias my.ip.adr.ess/MySecondSite/*
ServerAdmin myemail#adress.ext
Alias /MyFirstSite /usr/share/wordpress/FolderForMySecondSite
<Directory /usr/share/wordpress/FolderForMySecondSite>
Options FollowSymLinks MultiViews
Order allow,deny
AllowOverride All
Allow from all
</Directory>
<Directory /usr/share/wordpress/FolderForMySecondSite/wp-content>
Options FollowSymLinks MultiViews
Order allow,deny
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
It seems that the 2 sites in sites-available can work separatly when I enable them.
When I enable both of them simultaneously though, only one works. I think it's overwriting the other... (no apache error, by the way)
One other thing : the sites works when I reach http://my.ip.adr.ess (without the path for the site). And that I'dont't want it to !
What do you think ?
Many thanks in advance
Stanislas
I made this,finally, which seems better, after reading a bit more docs (https://httpd.apache.org/docs/2.2/mod/mod_alias.html) about apache configuration :
<VirtualHost *:80>
DocumentRoot /usr/share/wordpress
ServerName my.ip.adr.ess
ServerAdmin my.email#adress.ext
Alias /Alias1 /usr/share/wordpress/Folder1
<Directory /usr/share/wordpress/Folder1>
Options FollowSymLinks MultiViews
Order allow,deny
AllowOverride All
Allow from all
</Directory>
<Directory /usr/share/wordpress/Folder1/wp-content>
Options FollowSymLinks MultiViews
Order allow,deny
AllowOverride All
Allow from all
</Directory>
Alias /Alias2 /usr/share/wordpress/Folder2
<Directory /usr/share/wordpress/Folder2>
Options FollowSymLinks MultiViews
Order allow,deny
AllowOverride All
Allow from all
</Directory>
<Directory /usr/share/wordpress/Folder2/wp-content>
Options FollowSymLinks MultiViews
Order allow,deny
AllowOverride All
Allow from all
</Directory>
</VirtualHost>

how to have customisable wamp url

<VirtualHost *:80>
DocumentRoot "C:\wamp\www\TEST1\wordpress"
ServerName yg8i.tk
ServerAlias www.yg8i.tk
Options Indexes FollowSymLinks
<Directory "C:\wamp\www\TEST1\wordpress">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
but this will only give them my wordpress website and also if someone types www.yg8i.tk/whatever they will have access to my files.
and i also want to have custom urls so for example i would like to type www.yg8i.tk/login to login to my wordpress site so my solution was
<VirtualHost *:80>
DocumentRoot "C:\wamp\www\TEST1\wordpress\wp-login.php"
ServerName yg8i.tk\login
ServerAlias www.yg8i.tk\login
Options Indexes FollowSymLinks
<Directory "C:\wamp\www\TEST1\wordpress\wp-login.php">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
but it does not work i really need ur help.
I Hope You Help And Thank You In Advance.
Try changing to this, DocumentRoot and <Directory... can only have a directory as their value.
You can use the DocumentIndex to cause any other script to be launches
<VirtualHost *:80>
DocumentRoot "C:\wamp\www\TEST1\wordpress"
ServerName yg8i.tk\login
ServerAlias www.yg8i.tk\login
Options Indexes FollowSymLinks
DocumentIndex wp-login.php
<Directory "C:\wamp\www\TEST1\wordpress">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

Resources