.net - Virtual Host in Apache downloads the file instead of displaying it -
i'm using apache2 w/ mono mod , works fine when go local ip. 192.168.1.210
but when try go virtual host
www.example.com
it download webpage instead of displaying it. file: mod_mono.conf
gnu nano 2.2.6 addtype application/x-asp-net .aspx .ashx .asmx .ascx .asax .config .ascx directoryindex index.aspx # include web application definitions generated mono-server{2,4}-update. # # if want use asp.net 2.0 (via mono-apache-server2), use: # include /etc/mono-server2/mono-server2-hosts.conf # # if want use asp.net 4.0 (via mono-apache-server4), use: # include /etc/mono-server4/mono-server4-hosts.conf include /etc/mono-server4/mono-server4-hosts.conf <virtualhost *:80> servername example.com serveralias www.example.com serveradmin web-admin@example.com documentroot /var/www/html # monoserverpath can changed specify version of asp.net hosted # mod-mono-server1 = asp.net 1.1 / mod-mono-server2 = asp.net 2.0 # suse linux enterprise mono extension, uncomment line below: # monoserverpath example.com "/opt/novell/mono/bin/mod-mono-server4" # mono on opensuse, uncomment line below instead: monoserverpath example.com "/usr/bin/mod-mono-server4" # obtain line numbers in stack traces need 2 things: # 1) enable debug code generation in page using debug="true" # page directive, or setting <compilation debug="true" /> in # application's web.config # 2) uncomment monodebug true directive below enable mod_mono debugging #monodebug example.com true # mono_iomap environment variable can configured provide platform abstraction # file access in linux. valid values mono_iomap are: # case # drive # # uncomment line below alter file access behavior configured application monosetenv example.com mono_iomap=all # # additional environtment variables can set server instance using # monosetenv directive. monosetenv takes string of 'name=value' pairs # separated semicolons. instance, enable platform abstraction *and* # use mono's old regular expression interpreter (which slower, has # shorter setup time), uncomment line below instead: # monosetenv example.com mono_iomap=all;mono_old_rx=1 monoapplications example.com "/:/var/www/html" <location "/"> allow order allow,deny monosetserveralias example.com sethandler mono setoutputfilter deflate setenvifnocase request_uri "\.(?:gif|jpe?g|png)$" no-gzip dont-vary </location> <ifmodule mod_deflate.c> addoutputfilterbytype deflate text/html text/plain text/xml text/javascript </ifmodule> </virtualhost>
apache.conf
gnu nano 2.2.6 file: apache2.conf # main apache server configuration file. contains # configuration directives give server instructions. # see http://httpd.apache.org/docs/2.4/ detailed information # directives , /usr/share/doc/apache2/readme.debian debian specific # hints. # # # summary of how apache 2 configuration works in debian: # apache 2 web server configuration in debian quite different # upstream's suggested way configure web server. because debian's # default apache2 installation attempts make adding , removing modules, # virtual hosts, , configuration directives flexible possible, in # order make automating changes , administering server easy # possible. # split several files forming configuration hierarchy outlined # below, located in /etc/apache2/ directory: # # /etc/apache2/ # |-- apache2.conf # | `-- ports.conf # |-- mods-enabled # | |-- *.load # | `-- *.conf # |-- conf-enabled # | `-- *.conf # `-- sites-enabled # `-- *.conf # # # * apache2.conf main configuration file (this file). puts pieces # including remaining configuration files when starting # web server. # # * ports.conf included main configuration file. # supposed determine listening ports incoming connections can # customized anytime. # # * configuration files in mods-enabled/, conf-enabled/ , sites-enabled/ # directories contain particular configuration snippets manage modules, # global configuration fragments, or virtual host configurations, # respectively. # # activated symlinking available configuration files # respective *-available/ counterparts. these should managed using our # helpers a2enmod/a2dismod, a2ensite/a2dissite , a2enconf/a2disconf. see # respective man pages detailed information. # # * binary called apache2. due use of environment variables, in # default configuration, apache2 needs started/stopped # /etc/init.d/apache2 or apache2ctl. calling /usr/bin/apache2 directly not # work default configuration. # global configuration # # # serverroot: top of directory tree under server's # configuration, error, , log files kept. # # note! if intend place on nfs (or otherwise network) # mounted filesystem please read mutex documentation (available # @ <url:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>); # save lot of trouble. # # not add slash @ end of directory path. # #serverroot "/etc/apache2" # # accept serialization lock file must stored on local disk. # mutex file:${apache_lock_dir} default # # pidfile: file in server should record process # identification number when starts. # needs set in /etc/apache2/envvars # pidfile ${apache_pid_file} # # timeout: number of seconds before receives , sends time out. # timeout 300 # # keepalive: whether or not allow persistent connections (more # 1 request per connection). set "off" deactivate. # keepalive on # # maxkeepaliverequests: maximum number of requests allow # during persistent connection. set 0 allow unlimited amount. # recommend leave number high, maximum performance. # maxkeepaliverequests 100 # # keepalivetimeout: number of seconds wait next request # same client on same connection. # keepalivetimeout 5 # these need set in /etc/apache2/envvars user ${apache_run_user} group ${apache_run_group}
Comments
Post a Comment