wordpress - How can I run 2 sites on Apache? Complex situation -


my goal host 2 different sites same vm , both on port 80. 1 wordpress site on domain.com , other web-based app on app.domain.com. if can't done, alternate goal wordpress site running on domain.com port 80.

my registrar 1and1.com , dns settings (below). please note don't allow cname record primary domain, subdomain. here record (ip address , domain names in post not real ones):

   type: record   value: 123.456.789.10 

my host azure have vm running virtual ip address of 123.456.789.10. azure vm has endpoints configured this:

   tcp    public port 8080    private port 8080    tcp    public port 80      private port 80    tcp    public port 2121    private port 21    tcp    public port 22      private port 22 

on azure have dns zone configured this:

    name: www    type:    ttl: 3600    value: 123.456.789.10 

my apache default file configured this:

# wordpress website (domain.com)       listen 80       <virtualhost *:80>       documentroot /var/www/html/wordpress/       <directory "/var/www/html/wordpress/">           allowoverride       </directory>       </virtualhost>            # application (app.domain.com)       <virtualhost *:80>       documentroot /var/www/application/       <directory "/var/www/application/">           allowoverride       </directory>       </virtualhost> 

my .htaccess file in wordpress root folder configured this:

 # begin wordpress     <ifmodule mod_rewrite.c>     rewriteengine on     rewriterule ^index\.php$ - [l]     rewritecond %{request_filename} !-f     rewritecond %{request_filename} !-d     rewriterule . /index.php [l]     </ifmodule>  # end wordpress     <ifmodule mod_suphp.c>     addhandler application/x-httpd-php54 .php .php5 .php4 .php3     </ifmodule> 

wordpress config file:

    it's totally standard , site running last week without      issue while on port 8090, wanted use port 80 instead. 

ubuntu hosts file:

    127.0.0.1 localhost     servername domain.com # following lines desirable ipv6 capable hosts     ::1 ip6-localhost ip6-loopback     fe00::0 ip6-localnet     ff00::0 ip6-mcastprefix     ff02::1 ip6-allnodes     ff02::2 ip6-allrouters     ff02::3 ip6-allhosts 

currently i'm getting error message in browser >> site can’t reached domain.com took long respond. err_connection_timed_out when tweaking settings (above) directory listing in browser showed apache's default directory of /var/www

my feeling need more , cname records setup, don't know how configure them. i've spent 5 full days working on , googling solutions didn't work me. pointers great!

did try servername? , adding hosts file.

<virtualhost *:80>     servername domain.com     documentroot /var/www/html/wordpress/     errorlog /var/www/html/wordpress/error.log 

<virtualhost *:80>     servername app.domain.com     documentroot /var/www/application/     errorlog /var/www/application/error.log 


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -