I am having trouble accessing the Joomla administrator page in a subdomain.
Here's what it's like, the site is http://test.com and the admin page must be http://admin.test.com
I am using a WAMP server with virtual host enabled.
here's my httpd-vhosts.conf:
<VirtualHost *:80>
ServerAdmin admin#test.com
DocumentRoot "c:\wamp\www\test"
ServerName test.com
ServerAlias www.test.com
ErrorLog "C:\wamp\www\test\logs\error.log"
CustomLog "C:\wamp\www\test\logs\access.log" common
<Directory "c:/wamp/www/test">
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin admin#test.com
DocumentRoot "C:\wamp\www\test\administrator"
ServerName admin.test.com
ServerAlias www.admin.test.com
ErrorLog "C:\wamp\www\test\logs\error.log"
CustomLog "C:\wamp\www\test\logs\access.log" common
<Directory "c:/wamp/www/test/administrator">
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
test.com works fine, but the admin doesn't. It only displays a white blank page. I also noticed that the redirection works in admin since the page title loads the admin page title.
I'm using Joomla! 3.4.4 Stable, and WAMP Server with Apache/2.4.9 and PHP 5.5.12.
In your configuration.php file under your Joomla website, set $error_reporting to "maximum". This will show you what the error really is and will give you pinpoints on how to fix it.
Related
I am trying to have two separate sites with Apache virtual hosts on a test server. I am going to access the sites with the ip address of the instance (for example, http://167.275.122.215). When I enable the following configuration, I would be able to load the first site with just the ip address correctly (with http://167.275.122.215), but not http://167.275.122.215/exp. I get a 404 error when I point to that address. What am I doing wrong here?
<VirtualHost *:80>
ServerAdmin webmaster#localhost
DocumentRoot /var/www/html/main
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
Alias /exp /usr/share/wordpress
DocumentRoot /usr/share/wordpress
<Directory /usr/share/wordpress>
Options FollowSymLinks
AllowOverride all
DirectoryIndex index.php
require all granted
</Directory>
</VirtualHost>
In fact, my need is to be able to access the exp (experimental) site through the same ip while the main site is still available (from the original ip address). I tried giving a different port to the experimental site too (like below), but that still gave me a site can't be reached error.
<VirtualHost *:90>
<Directory /usr/share/wordpress>
Options FollowSymLinks
AllowOverride all
DirectoryIndex index.php
require all granted
</Directory>
</VirtualHost>
For port based multiple sites, listing the default port as the second site resolved the issue:
LISTEN 90
<VirtualHost *:90>
DocumentRoot /usr/share/wordpress
<Directory /usr/share/wordpress>
Options FollowSymLinks
AllowOverride all
DirectoryIndex index.php
require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster#localhost
DocumentRoot /var/www/html/main
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
I'm trying to configure my apache vhosts file to have a localhost/something hostname and "alias" hostnames. I'm working with google api's currenctly and they are not accepting custom aliases as url's, so I can't make it work with my custom url's. Any thoughts of what to do? My current config that's not working:
<VirtualHost 127.0.0.1:80>
ServerName localhost/go
ServerAlias localhost/go
DocumentRoot "D:/username/Web/server.dev/go"
</VirtualHost>
<Directory "D:/username/Web/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
<VirtualHost *:80>
ServerName api.server.dev
ServerAlias api.server.dev
DocumentRoot "D:/username/Web/server.dev/api"
</VirtualHost>
##... more custom urls with subdomains cut out because it's unnecessary
<VirtualHost *:80>
ServerName adstrck.server.dev
DocumentRoot "D:/username/Web/server.dev/adstrck"
</VirtualHost>
### ALL OTHERS ###
<VirtualHost *:80>
ServerName www.server.dev
ServerAlias server.dev *.server.dev
DocumentRoot D:/username/Web/server.dev
</VirtualHost>
When I'm trying to access 127.0.0.1/go or localhost/go I get an internal server error.
Maybe what you want is something like this
<VirtualHost 127.0.0.1:80>
ServerName localhost
ServerAlias server.dev *.server.dev
DocumentRoot "D:/username/Web/server.dev"
</VirtualHost>
<Directory "D:/username/Web/server.dev">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
Then use a url like http://localhost/go to view the site.
Depending on your OS/browser, you may be able to add a development subdomain to localhost. E.g.
<VirtualHost *:80>
ServerName dev1.localhost
## rest of your config
## e.g. ServerAlias my.website.on.the.internet.com
DocumentRoot /var/www/dev1
</VirtualHost>
<VirtualHost *:80>
ServerName dev2.localhost
DocumentRoot /var/www/dev2
</VirtualHost>
# Default / catch-all
<VirtualHost *:80>
DocumentRoot /var/www/html
</VirtualHost>
I then pointed my browser to dev1.localhost and that resolved to dev1 and likewise for dev2.localhost and localhost by itself resolved to the default apache page.
This resolved my similar problem. Tested on Apache in a Debian WSL. Worked on Windows Chrome, failed on Windows Firefox. Based on this SO: https://stackoverflow.com/a/35124491
This is my sites-available/FlaskApp.conf file
<VirtualHost *:80>
ServerName www.mywebsite.design
ServerAlias mywebsite.design
ServerAdmin myemail#gmail.com
WSGIScriptAlias / /var/www/FlaskApp/flaskapp.wsgi
<Directory /var/www/FlaskApp/FlaskApp/>
Order allow,deny
Allow from all
</Directory>
Alias /static /var/www/FlaskApp/FlaskApp/static
<Directory /var/www/FlaskApp/FlaskApp/static/>
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
www.mywebsite.design works when i open on the browser correctly. However when i go to mywebsite.design the Ubuntu Default "It Works" page shows up.
I followed this tutorial Hosting a FlaskApp
When i tried IPAddress as the Servername like this -
ServerName 139.55.55.55
for some reason the opening the IP address on the browser opens correctly but both www.mywebsite.design or mywebsite.design don't shows the same Ubuntu Default Page
I had mywebsite.design on /etc/hosts like this -
127.0.1.1 mywebsite.design mywebsite
. probably because i named the project that way at some point!
Removed it and just put my name there and it worked!
I am a newbie to apache and server setup. I am migrating several sites from GoDaddy to a DigitalOcean VPS droplet. I am moving my first site over (a Wordpress install) and am having some trouble with VirtualHost. Here is the configs:
<VirtualHost *:80>
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot /var/www/html/domain.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Heres the thing, I have a www alias set up in the domain name records, and www.domain.com points correctly to the site, but domain.com points to the root var/www/html, not the subdirectory where the site is. I've searched for far too long, but every tutorial and forum seems to provide the same code I currently have configured. What am I doing wrong? I want to make sure it all works correctly before I take the next step of installing an SSL, but I am spinning my wheels at the moment.
The correct way to set up a virtual host is:
<VirtualHost *:80>
ServerAdmin admin#domain.com
DocumentRoot /path/to/the/directory
DirectoryIndex index.html index.php
ServerName domain.com
ServerAlias www.domain.com
ErrorLog ${APACHE_LOG_DIR}/domain.com.error.log
CustomLog ${APACHE_LOG_DIR}/domain.com.access.log combined
<Directory /path/to/the/directory>
Options -Indexes
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I have created a subdomain for one of my domains, now I have the following issue:
if I go to blog.domain.com it shows me index.html which is fine
if I go to blog.domain.com/index.html it shows me index.html which is fine
if I go to blog.domain.com/somelog.txt it shows me somelog.txt which is fine
BUT if i try to access any .php file (wordpress) it will show me 404 page not found.
What am I doing wrong? Did I setup apache the wrong way?
the following info in apache/httpd.conf:
<VirtualHost 00.00.00:80>
ServerAdmin info#domain.com
ServerName domain.com
ServerAlias domain.com
DocumentRoot /var/www/domain.com
<Directory /var/www/domain.com>
Order Deny,Allow
Allow from all
Options -Indexes
</Directory>
</VirtualHost>
And this is the newly added subdomain:
<VirtualHost 00.00.00:80>
ServerAdmin info#domain.com
ServerName blog.domain.com
ServerAlias blog.domain.com
DocumentRoot /var/www/domainBLOG
<Directory /var/www/domainBLOG>
Order Deny,Allow
Allow from all
Options -Indexes
</Directory>
</VirtualHost>