DNS error - host not found after enabling site - wordpress

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

Related

Apache2 shows default page even after disabling it

I've moved a wordpress site to an Ubuntu Server. While I access it from localhost everything works fine but when I try from my public IP address I can only see the apache2 default page.
I tried everything:
Disabled 000-default.conf and enabled mine
Deleted the default HTML page
Added AllowOverride All
Here there's my Virtual Host file
<VirtualHost *:80>
<Directory "/var/www/exidis">
AllowOverride All
</Directory>
ServerName alternanza.duckdns.org
ServerAlias www.alternanza.duckdns.org
DocumentRoot /var/www/exidis
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Thanks in advance for any suggestion

I am not able to trace the error shown by browser

just before running my site on apache server, site ran properly on django server at port 8000
then i made necessary permssion changes and run the site on apache server
apachectl configtest is ok
Configuration check via
grep -inRH "ServerName " /etc/apache2/ | grep "\s#"*
shows the result give below
/etc/apache2/sites-enabled/site.conf:2: # The ServerName directive sets the request scheme, hostname and port that
/etc/apache2/apache2.conf:56:ServerName localhost
/etc/apache2/sites-available/site.conf:2: # The ServerName directive sets the request scheme, hostname and port that
/etc/apache2/sites-available/000-default.conf:2: # The ServerName directive sets the request scheme, hostname an port that
/etc/apache2/sites-available/000-default.conf:9: #ServerName www.example.com
I tried adding ServerName localhost in site.conf file
but it doesn't seem to work
here is my site.conf code
ServerName localhost
ServerAdmin webmaster#localhost
DocumentRoot /var/www/html
Alias /static /home/user/site/static
<Directory /home/user/site/static>
Require all granted
</Directory>
Alias /media /home/usre/site/media
<Directory /home/user/site/media>
Require all granted
</Directory>
<Directory /home/user/site/site>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIScriptAlias / /home/user/site/site/wsgi.py
WSGIDaemonProcess django_app python-path=/home/user/site python-home=/home/user/site/venv
WSGIProcessGroup django_app
I am not able to resolve that where the problem is.

wordpress site working locally but not from the domain

My wordpress site is working locally in my wamp server, this is hosted on an ec2 instance and domain is maintained in Route 53\cloudfare. The domain is working when i checked it using mxtoolbox. The site was working and live till the time i changed my host file in the server. I removed the host file entries accidentally thinking it is a dev site, however i restored it but still the site is not working and i am getting only the "TOO MANY REDIRECTS" error. The following is the current windows host file details
#
127.0.0.1 localhost
::1 localhost
127.0.0.1 mydomain.com
::1 mydomain.com
I restarted the server and WAMP multiple times but it is not working.
The following is my virtualhost configuration
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
#
<VirtualHost *:80>
ServerName mydomain.com
DocumentRoot "c:/wamp/www/sitefolder"
<Directory "c:/wamp/www/sitefolder/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.mydomain.com
DocumentRoot "c:/wamp/www/sitefolder"
<Directory "c:/wamp/www/sitefolder/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride all
Require all granted
</Directory>
</VirtualHost>`
Clean your cache and browser history first, then try doing it below:
Open your wordpress admin panel --> Settings--> General --> Make sure it points to the correct domain. --> Save
Or go to the wp-config.php file (Try this if the first method fails / can't be accessed)
add:
define('WP_HOME','http://YourDomain.com');
define('WP_SITEURL','http://YourDomain.com');
or
Try to remove or rename default .htaccess
or
Try to disable the plugin (renaming the plugin folder in the "wp-content/plugin/plugin-folder-name" will non-active that plugin. This might solve the problem if the constraints are due to the plugin)
That's a number of ways when I resolve the ERR_TOO_MANY_REDIRECTS problem. Goodluck

Virtualhost problems. Have two vhost files but results are unexpected 2nd site does not load properly

I have 1 ubuntu 14.04 server from DO and two independant WordPress installations I'm trying to run off the same server
Have two apache vhost config files:
000-default.conf and 001-default.conf
Now when navigating to domain1.com everything works flawlessly. The entire website is working as expected. But there is a problem with going to domain2.com it will automatically redirect to domain1.com. Basically the problem is I can't get to the WordPress installation screen on domain2.com
Here is the conf file under sites available for domain1.com (000-default.conf):
<VirtualHost *:80>
ServerAdmin email#gmail.com
ServerName domain1.com
ServerAlias www.domain1.com
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
config file for domain2.com (001-default.conf):
<VirtualHost *:80>
ServerAdmin email#gmail.com
ServerName domain2.com
ServerAlias www.domain2.com
DocumentRoot /var/www/htmlposts
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/htmlposts>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Additional information:
In /var/www/html I have the WordPress files for domain1.com and everything works.
In /var/www/htmlposts/ I have extracted the WordPress files for domain2.com
it looks like this: http://prntscr.com/d4h9gu
I have created an index.html file in /var/ww/htmlposts which is the directory for domain2.com and when I navigate to domain2.com/index.html the file displays as expected but when I navigate to domain2.com/wp-admin/install.php which should start the wp installation process for instance #2 "domain2.com" it shows an already installed error which looks like this: http://prntscr.com/d4hhav
There are two databases on the server. One is for domain1.com and the other database is an empty one that I created for domain2.com. Both are correctly pointed in their respective wp-config.php files.
Can you compare the config.php of the 2 sites. Make sure that the database names in both the config.php files are different.

Can't get to subsites. Wildcard-subdomains probably misconfigured in Apache

I'm building a portal for the organization I'm working at.
The portal is a Wordpress site using Wampserver 2.5, intalled on a Win server 2008 R2.
It's working fine and accesible from other machines over the intranet, thanks to the helpful and patient RiggsFolly.
But now, I have changed it into a network of sites so that I can build sub-portals for the different departments in my organization.
During that change Wordpress gave this warning message: Warning! Wildcard DNS may not be configured correctly!
Wordpress has a page explaining how to configure wildcard subdomains on Apache - http://codex.wordpress.org/Configuring_Wildcard_Subdomains.
I tried following it but the explanation lacks details and I'm probably doing something wrong.
On the machine where the servers and site are installed, when I write http://hipo (hipo is the current site name) in the browser's address bar, I get to the site fine.
But when I write http://depa.hipo (depa is a subsite I created successfully), the address changes into http://www.depa.hipo/ and the browser says it didn't find a server at that address.
I have probably set the ServerAlias line wrong in httpd-vhosts.conf, and also I didn't add the line *.example.com A 192.0.43.10, or in my case *.hipo A <rightIP>, cause I wasn't sure where to add it in the file.
This is my httpd-vhosts.conf file. Your help is appreciated!
<VirtualHost *:80>
DocumentRoot "c:/wamp/www/hipo"
ServerName hipo
<Directory "c:/wamp/www/hipo">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/wamp/www/hipo"
ServerName subsites.hipo
ServerAlias *.hipo
<Directory "c:/wamp/www/hipo">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/wamp/www"
ServerName localhost
ServerAlias localhost
<Directory "c:/wamp/www">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
This definition does not have a ServerAlias so try adding one like this:
<VirtualHost *:80>
DocumentRoot "c:/wamp/www/hipo"
ServerName hipo
ServerAlias www.hipo
<Directory "c:/wamp/www/hipo">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

Resources