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.
Related
Hello There Im Looking For Efficient Way To Hide The Path File In XAMPP LOCALHOST
For Example The Default Path Is [ For Wordpress Files ]
localhost/wordpress
how can i turn it to
localhost only without the /wordpress file path ?
i tired to add a dns localhost to ==>
host file in
C:\Windows\System32\drivers\etc
like
127.0.0.1 testing.com
and added this to the httpd-vhosts.conf
default port is == 80
<VirtualHost *:8010>
DocumentRoot "F:\DEV\htdocs\wordpress"
ServerName testing.com
ServerAlias testing.com
<Directory "F:\DEV\htdocs\wordpress>
Require all granted
</Directory>
</VirtualHost>
when i enter == testing.com [ it's redirecting me to testing.com/dashboard -- testing.com/wordpress
i just need it testing.com
I USE
XAMPP Control Panel V3.2.4
Apache Server
MySQL Database
Wordpress framework == 5.5.1
Please try below code it might help you.
Add this line In host file
127.0.0.1 testing.com
I have just tested this code and it's working
This code in httpd-vhosts.conf
<VirtualHost *:80> ## i have removed 10 from port and it was working in mine
DocumentRoot "D:/xampp/htdocs/wordpress"
ServerName testing.com
ServerAlias testing.com
<Directory "D:/xampp/htdocs/wordpress>
Require all granted
</Directory>
</VirtualHost>
My Needs are
1. Configure Multiple Domain on XAMPP server on production (Woocommerce Site)
2. Configure and enable ssl
Steps i followed
Edited httpd-vshost as
NameVirtualHost *:80
ServerAdmin mail#firstsite.in
DocumentRoot "C:/xampp/htdocs/firstsite"
Allow from all
ServerName firstsite.in
ServerAlias www.firstsite.in
ServerAdmin mail#secondsite.in
DocumentRoot "C:/xampp/htdocs/secondsite"
ServerName secindsite.in
ServerAlias www.secondsite.in
Allow from all
Edited httpd-ssl
<VirtualHost _default_:443>
ServerAdmin admin#localhost
DocumentRoot "C:/xampp/htdocs/firstsite"
ServerName firstsite.in:443
ServerAlias www.firstsite.in:443
ErrorLog "logs/example-error.log"
CustomLog "logs/example-access.log" common
SSLEngine on
SSLCACertificateFile "C:\xampp\apache\conf\mibstore\ca_bundle.crt"
SSLCertificateFile "C:\xampp\apache\conf\mibstore\server.crt"
SSLCertificateKeyFile "C:\xampp\apache\conf\mibstore\server.key"
</VirtualHost>
<VirtualHost _default_:443>
ServerAdmin admin#localhost
DocumentRoot "C:/xampp/htdocs/secondsite"
ServerName secondsite.in:443
ServerAlias www.secondsite.in:443
ErrorLog "logs/example-error.log"
CustomLog "logs/example-access.log" common
SSLEngine on
SSLCACertificateFile "C:\xampp\apache\conf\ricebazzar\ca_bundle.crt"
SSLCertificateFile "C:\xampp\apache\conf\ricebazzar\server.crt"
SSLCertificateKeyFile "C:\xampp\apache\conf\ricebazzar\server.key"
</VirtualHost>
I have obtained SSL certificate from sslforfree and stored them on relevant path
I also edited etc\hosts file
127.0.0.1 firstsite.in
127.0.0.1 secondsite.in
Issue
I can able to browse them from the server(windows) itself , but can't able to access them from outside. the relevant domain names are purchased and added a A record to point the IP.
Notes
Using Amazon AWS EC2 instance
Added Inbound Rules on 80 & 443, And also added firewall rules on 80 & 443
Would you tried in another PC to visit them since you changed your host file on your PC.
If they can be visited then you need remove the record of your host file.
If not, please try:
Does both the A record of WWW and Non-WWW have been pointed to IP.
If pointed, please tell me what error or message you see on browser when you load the websites.
If there're no error or message which means they are blank page, please try to check is there any htaccess file, do you enable the rewrite mod of xampp.
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
Can i run different websites in same domain. like
http://www.example.com ----> in WordPress
https://example.com/ -----> in laravel
Here is the reference site
Website : www.linqs.in
APP: https://linqs.in/username
App url will open user's profile by provided username.
sorry if i made mistake !! if this possible please guide me.
You can do this in your virtual host configuration:
Listen 80
Listen 443
<VirtualHost *:80>
ServerName example.com
DocumentRoot "/path/to/wordpress"
</VirtualHost>
<VirtualHost *:443>
ServerName example.com
DocumentRoot "/path/to/laravel/public"
</VirtualHost>
You may also need to define directories if the sources are not under your default http root. For example:
<VirtualHost *:443>
ServerName example.com
DocumentRoot "/path/to/laravel"
<Directory /path/to/laravel>
AllowOverride All
</Directory>
</VirtualHost>
This will also allow Apache to serve that directory and use any .htaccess files (if it wasn't allowed already).
Since URL listen on port like http - port 80, https - port 443. So, you can ensure different website in a same domain via VirtualHost configure.
Been working on a locahost VHost setup for a WordPress Roots development environment with Bedrock including Composer, Capistrano and WP CLI using Homebrew on my OSX Mavericks Mac Mini all morning. I am using Homebrew's PHP 5.5 and MySQL 5.6.19 and OSX's Apache. Thought I had sort of understood Apache VirtualHost inner workings, but I am missing something.
I added img.local to /etc/hosts
127.0.0.1 localhost img.local
255.255.255.255 broadcasthost
::1 localhost img.local
fe80::1%lo0 localhost img.local
and have this in /etc/apache2/extra/httpd-vhosts.conf:
NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
DocumentRoot "/Library/WebServer/Documents"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
ServerAdmin jasper#img.local
DocumentRoot "/Users/jasperfrumau/webdesign/img/web"
ServerName img.local
ServerAlias www.img.local
ErrorLog "/private/var/log/apache2/img.local-error_log"
CustomLog "/private/var/log/apache2/img.local-access_log" common
<Directory "/Users/jasperfrumau/webdesign/img/web/">
Option FollowSymlinks
AllowOverride All
Order allow, deny
allow from all
</Directory>
</VirtualHost>
I restarted the server using apachectl -k restart as root after I checked the config using apachectl -S . It said I was all good:
apachectl -S
VirtualHost configuration:
Syntax OK
When I load img.local in my browser the root localhost is loaded. So either my img.local is still bypassed because of a faulty vhosts file or there is something else in /etc/apache2/httpd.conf I need to change. What am I missing or doing wrong here?
In the end I realised the /etc/apache2/httpd.conf was loading the vhosts from /private/etc/apache2/other/*.conf so I added one img.conf there and restarted the server. There were some errors in the file after all once it was read. This is the correct one:
<VirtualHost *:80>
ServerAdmin jasper#img.local
DocumentRoot "/Users/jasperfrumau/webdesign/img/web"
ServerName img.local
ServerAlias www.img.local
ErrorLog "/private/var/log/apache2/img.local-error_log"
CustomLog "/private/var/log/apache2/img.local-access_log" common
<Directory "/Users/jasperfrumau/webdesign/img/web/">
Options FollowSymlinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>