php - Ubuntu Server Virtual Host not redirecting properly


I have installed Web site on my Ubuntu Server.

The following things are installed on my Server for running web service. 1) Apache2 2) PHP5 3) MySql

My main website is redirected to https.

Example (changed for security purpose)

    <VirtualHost *.80>
Redirect permanent /

In my default-ssl.conf file i have added the following info.

<VirtualHost _default_:443>
DocumentRoot /var/www/
SSLEngine On
SSLCertificateFile /etc/ssl/
SSLCertificateKeyFile /etc/ssl/

Other settings in above is default.

My main issues comes when i create link for my website like it goes to Apache2 Default Web Page and does not go to correct site. If i write in browser directly it works perfect and redirects to

1 Answer: 

try to enable your virtual host by command a2ensite default-ssl.conf and disable the default 00-default.conf with command a2dissite 00-defaullt.conf


More Articles

linux - diff command to get number of different lines only

Can I use the diff command to find out if two of files differ by k lines?I don't want the contextual difference, just the total number of lines that are different between two files. Best if the result is just a single integer.

bash - append text to file using shell from php

I trying to append passed text as parameter to file using shell scriptthis is the code of shell echo $1>>/etc/freeradius/mods-enabled/ldapthis shell will get the text to add it to the file ldap in /etc/freeradius/mods-enabled path , I call this shell in this format # sh /etc/ hello

ubuntu - Shell command to get remote system's ip address from its mac address?

I have the HWAddress of remote machine but its IP address is not static and keeps changing. How do I get its IP address through shell?Relevant questions mostly have the remote system in the same network, but in my case its not.EDIT: I know its IP range.

Get Python command line output when called from a bash script

This may be a super simple question. I am calling a Python script on an Lubuntu OS (Cubietruck) via a shell script. This is to automate the process on start up (I want to maintain this process). Is there a simple way to view the output from Python? At the moment the Python script runs in the backgro

shell - Gmail imap can't access folders with space (or other escapted characters) in the title

Lets say i'm connection to via shell>> openssl s_client -connect -crlf>> a1 login asdasdasdasdGetting the list of the folders:>> a1 list "" *Respond:....* LIST (\HasChildren) "/" "github"* LIST (\HasNoChildren) "/" "Wizz&AKA-Ai

shell - Move output of Find command unix

Im learning unix programming , i want to find all files whose size is greater than 1M an print them into a is my code find. -size +1M -print0 | xargs -I -O '{}' mv '{}' files all sites i have found refer to this one as right one , but it does not work . currently im working on ubuntu

node.js - Not able to run my node app at port 80 on ubuntu 16.04

I want to run my node app at port 80 in ubuntu 16.04. But the moment I'm trying to run my app with npm start its throwing error Port in already in use whereas it's not in use. According to Github Reply, We need root privileges to run on ports below 1048 which is correct.So the moment I'm trying to r

ruby on rails - tmux: are my other terminals still running?

I have started using a certain technique for launching my web code since I switched server setups. I type tmuxsudo startserverrailsCtrl+B then DThen to reboot I type tmuxsudo killall rubysudo startserverrailsCtrl+B then DMy questions are: when I kill the ruby, does that end the session that I starte

php - How to redirect everything after slash to domain before?

This is what I'm trying to do:I want{whatever} redirected to{whatever}. For example, should be redirected to if there is nothing after /car/, then just leave it as that. How can i do that in .htaccess ?

node.js - Querying multiple sensors regularly using NodeJS

I need to fetch the values of about 200 sensors every 15 seconds or so. To fetch the values I simply need to make an HTTP call with basic authentication and parse the response. The catch is that these sensors might be on slow connection so I need to wait at least 5 seconds for one sensor (but usuall