I'm working on a Symfony2 project (using latest 2.3.2) and for that I made this virtual host:
<VirtualHost *:80>
DocumentRoot /var/www/html/nnplat/web
ServerName nnplat.devserver
<Directory /var/www/html/nnplat/web>
AllowOverride all
Allow from all
</Directory>
ErrorLog logs/nnplat-error_log
CustomLog logs/nnplat-access_log common
</VirtualHost>
If I call http://nnplat.devserver I got this error:
Oops! An Error Occurred The server returned a "404 Not Found".
Something is broken. Please e-mail us at [email] and let us know what
you were doing when this error occurred. We will fix it as soon as
possible. Sorry for any inconvenience caused.
But if I call this URL http://devserver/nnplat/web/app_dev.php it works, where is the problem? I can't find what is wrong in my VH
try this
ServerName nnplat.devserver
<VirtualHost *:80>
DocumentRoot /var/www/html/nnplat/web
<Directory "/var/www/html/nnplat/web">
DirectoryIndex app_dev.php
Options -Indexes FollowSymLinks SymLinksifOwnerMatch
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
Related
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 just started a project and when I try to access the website I get this error:
Forbidden
You don't have permission to access this resource.
Here's the config of my website:
<VirtualHost *:80>
ServerName portfolio.lxc
ServerAdmin webmaster#localhost
DocumentRoot /var/www/portfolio/public
<Directory /var/www/portfolio/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
I enabled my website like this
a2ensite portfolio
systemctl reload apache2
And then this error. When I looked on the Internet, it was said to allow "Options FollowSymLinks" but it's already allowed on my conf. I tried
chmod -R 777 /var/www/portfolio/
But I still get this error.
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
<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>
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>