apache - Running multiple sub-domains from one domain and one server -


i'm using apache2 host website on ubuntu server. can set things correctly main domain, example.com, have been struggling setting subdomains, such example.com/example2. each example, @ least now, being run using flask.

i expect issue setting .conf file(s) , virtual hosts, i've been working on, no configuration i've tried far has given me working result. here i've tried far:

under /etc/apache2/sites-available/ first tried using multiple .conf files, example1.conf , example2.conf. each 1 contained this:

  <virtualhost *:80>       servername example.com       serveradmin admin@example.com       wsgiscriptalias / /var/www/example1/example1.wsgi       <directory /var/www/example1/example1/>           order allow,deny           allow       </directory>       alias /static /var/www/example1/example1/static       <directory /var/www/example1/example1/static/>           order allow,deny           allow       </directory>       errorlog ${apache_log_dir}/error.log       loglevel warn       customlog ${apache_log_dir}/access.log combined   </virtualhost> 

or, in sub-domain, similar .conf file list server name example.com/example2 , point directory containing files want that. didn't work, tried using single file, example.conf , putting multiple <virtualhost> definitions inside, each referencing server name want , files go it. hasn't worked either, , serving example1 @ example.com. receive 404 error when try access example.com/example2.

can provide guidance? perhaps i'm going entirely wrong. if i've left out information, please let me know , i'll edit in.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -