Hinnavaatlus
:: Foorum
:: Uudised
:: Ärifoorumid
:: HV F1 ennustusvõistlus
:: Pangalink
:: Telekavad
:: HV toote otsing
|
|
autor |
|
Vahur
HV Guru

liitunud: 01.10.2006
|
27.04.2013 22:41:25
Alamdomeen |
|
|
Järgmine mure. On olemas domeen (nt. nimi.ee). Oleks vaja teha sellele alamdomeen nt. kaart.nimi.ee, ning selle alamdomeen peaks oma sisu võtma aadressilt nimi.ee/~kasutaja/kaust.
Domeen on registreeritud GoDaddys, ning hetkel on mul lihtsalt tehtud alamdomeeni suunamine, aga see eriti ei sobi, sest vana aadress tuleb peale suunamist nähtavale. Oleks siis nö. päris alamdomeeni vaja, mitte suunatud alamdomeeni.
Mis ma tegema peaksin? Oma DNS'i püsti panema ja kuidagi seal seda tegema?
|
|
Kommentaarid: 458 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
388 |
|
tagasi üles |
|
 |
siinus
HV Guru

liitunud: 20.01.2007
|
27.04.2013 22:54:21
|
|
|
Godaddys peaks minuteada mingi DNS haldus olemas olema. Pole kogemusi seal.
nimi.ee peaks sul hetkel olema lihtsa A kirjena mingile serveri IP'le määratud.
kaart.nimi.ee jaoks tuleb teha samamoodi A kirje samale IP'le.
Seda ma aga hetkel ei tea, kus ja kuidas sa oma lehti hostid. Võiksid valgustada.
alamdomeeni tarbeks on veebihostis vaja virtualhosti, mis vajalikust kohast lehe kuvab.
_________________ suck less | ANNA MU SAI!
Ma arvasin, et see oli Priit, aga tegelikult oli Tõnu, |
|
Kommentaarid: 66 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
59 |
|
tagasi üles |
|
 |
Vahur
HV Guru

liitunud: 01.10.2006
|
27.04.2013 23:01:22
|
|
|
Lehed jooksevad Synology NAS'is.
nimi.ee jaoks on tehtud seal A kirje serverile. Kui ma kaart.nimi.ee'le lihtsalt sama IP suunan, siis ta ei oska õigesse kohta edasi minna, vaid läheb ikka ainult sinna kuhu nimi.ee.
|
|
Kommentaarid: 458 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
388 |
|
tagasi üles |
|
 |
siinus
HV Guru

liitunud: 20.01.2007
|
27.04.2013 23:10:50
|
|
|
Sünologu peal jookseb Apache httpd?
Kui Apache, siis peab konfi natuke täiendama ja virtualhosti juurde tegema.
_________________ suck less | ANNA MU SAI!
Ma arvasin, et see oli Priit, aga tegelikult oli Tõnu, |
|
Kommentaarid: 66 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
59 |
|
tagasi üles |
|
 |
Vahur
HV Guru

liitunud: 01.10.2006
|
27.04.2013 23:24:02
|
|
|
siinus, Apache 2.2.23 jookseb seal jah.
|
|
Kommentaarid: 458 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
388 |
|
tagasi üles |
|
 |
siinus
HV Guru

liitunud: 20.01.2007
|
27.04.2013 23:44:04
|
|
|
/usr/syno/apache/conf/httpd.conf-user faili lisa:
<VirtualHost *:80>
DocumentRoot "/home/kasutaja/public_html/kaust"
ServerName kaart.nimi.ee
</VirtualHost> |
Võimalik, et ajan aiateibaid, aga synology foorumis sarnaselt õpetati.
_________________ suck less | ANNA MU SAI!
Ma arvasin, et see oli Priit, aga tegelikult oli Tõnu, |
|
Kommentaarid: 66 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
59 |
|
tagasi üles |
|
 |
Vahur
HV Guru

liitunud: 01.10.2006
|
28.04.2013 13:38:33
|
|
|
Nüüd suunab kaart.nimi.ee samasse kohta kuhu nimi.ee.
|
|
Kommentaarid: 458 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
388 |
|
tagasi üles |
|
 |
olavsu1
külaline
|
28.04.2013 14:02:51
|
|
|
sirvi siit
http://httpd.apache.org/docs/2.2/vhosts/examples.html
ma prooviks nii
<VirtualHost kaart.nimi.ee:80>
DocumentRoot "/home/kasutaja/public_html/kaust"
ServerName kaart.nimi.ee
</VirtualHost>
|
//mässasin küll kunagi apache ja tema virtuaalserveritega
|
|
tagasi üles |
|
 |
siinus
HV Guru

liitunud: 20.01.2007
|
28.04.2013 17:16:23
|
|
|
Apachele restart ikka tehtud?
_________________ suck less | ANNA MU SAI!
Ma arvasin, et see oli Priit, aga tegelikult oli Tõnu, |
|
Kommentaarid: 66 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
59 |
|
tagasi üles |
|
 |
Vahur
HV Guru

liitunud: 01.10.2006
|
30.04.2013 16:26:41
|
|
|
Restart tehtud ja: /usr/syno/etc/rc.d/S97apache-user.sh restart
Arvan, et see ei toimi sellepärast, et kõik lehe failid jne ei ole ainult ühes kaustas. nimi.ee/~kasutaja/kaust lehele minnes on mul galerii, aga Synologys on kasutaja/kaust asukohas ainult selle albumi pildid, muud failid asuvad kusagil mujal. Sellepärast olekski vaja kusagil kuidagi määrata, et alamdomeen kaart.nimi.ee oleks nimi.ee/~kasutaja/kaust.
Edit: Tundub, et keegi teine pole vist sellist enesestmõistetavat asja teinud Synologyga või siis millegi muuga
|
|
Kommentaarid: 458 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
388 |
|
tagasi üles |
|
 |
tomes
HV kasutaja
liitunud: 22.01.2009
|
30.04.2013 16:46:40
|
|
|
Üks variant on veel mod_proxy, kuid ma pole kindel, et see antud purgis olemas on.
<VirtualHost *:80>
ServerName kaart.nimi.ee
ProxyPreserveHost On
ProxyRequests off
ProxyPass / http://nimi.ee/~kasutaja/kaust
ProxyPassReverse / http://nimi.ee/~kasutaja/kaust
</VirtualHost>
Vaikimisi VirtualHost jääb alles.
|
|
Kommentaarid: 64 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
58 |
|
tagasi üles |
|
 |
Vahur
HV Guru

liitunud: 01.10.2006
|
30.04.2013 20:43:29
|
|
|
tomes, huvitav kas DNS'is peab alamdomeenile olema määrtatud asukohaks lihtsalt serveri IP? Hetkel ei tee see asi mul midagi, kuigi mod_proxy on laetud.
|
|
Kommentaarid: 458 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
388 |
|
tagasi üles |
|
 |
obundra
Kreisi kasutaja

liitunud: 06.01.2004
|
30.04.2013 22:53:37
|
|
|
Vaja on lisaks kaart.nimi.ee-le ka nimi.ee jaoks eraldi vhost teha, vähemalt nii olen mina apatsi konfinud.
NameVirtualHost *:80
<VirtualHost *:80>
ServerName nimi.ee
DocumentRoot /nimi.ee/failide/kaust
</VirtualHost>
<VirtualHost *:80>
ServerName kaart.nimi.ee
DocumentRoot /kaart.nimi.ee/failide/kaust
</VirtualHost> |
_________________ Hold the heathen hammer high! |
|
Kommentaarid: 27 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
1 :: |
25 |
|
tagasi üles |
|
 |
tomes
HV kasutaja
liitunud: 22.01.2009
|
30.04.2013 23:45:28
|
|
|
Nii nimi.ee kui ka kaart.nimi.ee peavad viitama serveri IP-le (nt esimene on A-kirje ja teine alias, samas võivad mõlemad A-kirjed ka olla).
obundra märkus õige - kui just dünaamilisi vhoste ei kasuta, siis tuleb mõlemad domeenid ära kirjeldada. Sama kehtib ka mod_proxy korral.
Enda näite toimivuses täiesti kindel pole, sai korra Apache-t reverse proxy-na kasutatud, kuid mul oli suunatud otse juurikasse (ProxyPass / http://nimi.ee) ning lõpuks läksin üldse nginx peale üle.
Samuti ei saa brauserid alati peale vhostide muutmist asjadest õigesti aru, kindlam on brauser vahepeal kinni panna või kasutada privaatlehitsemist.
|
|
Kommentaarid: 64 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
58 |
|
tagasi üles |
|
 |
Vahur
HV Guru

liitunud: 01.10.2006
|
01.05.2013 12:27:25
|
|
|
Proovin uuesti algusest peale seletada, mis hetkel on ja mida ma vaimusilmas ette näen.
Synology NAS, millel peal DSM 4.2-3211.
Registreeritud on domeen, ütleme, et selleks nimi.eu. A kirjetes on suunatud NAS'i IP peale @ ja album.
NAS'is on mul tehtud kasutajaid ning installitud "Photo Station" nimeline package. Viimase seadistustest on mul määratud, et iga NAS'i kasutaja saab endale teha albumi. Albumile saab ligi üle veebi aadressiga http://nimi.eu/~Kasutajanimi/photo
Photo Stationi veebifailid asuvad kaustas "/var/packages/PhotoStation/target/photo". Failid on seal dünaamilise sisuga, ehk, et kõikidele kasutajatele on samad failid. Sisu kuvatakse tõenäoliselt vastavalt sellele millise kasutajanime albumile tullakse (määratud aadressil ~Kasutajanimi).
Sooviksin, et ei peaks albumisse minekuks kasutama aadressi http://nimi.eu/~Kasutajanimi/photo vaid saaksin sinna ligi alamdomeeniga, http://album.nimi.eu.
Hetkel on mul tehtud GoDaddy's (sinna on domeen registreeritud) maskitud aadressi suunamine. See ei sobi, sest kui albumis kusagile lehele liigun, siis aadressireal midagi ei muutu, ehk siis ei ole võimalik albumeid linkida.
Tavaline aadressi suunamine ka ei sobi, sest seljuhul pärast kasutaja lingib seda pikka ja lohisevat aadressi kus ~Kasutajanimi sees.
Apache konfiguratsioonifail on selline: /usr/syno/apache/conf/httpd.conf-user
Spoiler 
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "@@ServerRoot@@" will be interpreted by the
# server as "@@ServerRoot@@/logs/foo.log".
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path. If you point
# ServerRoot at a non-local disk, be sure to point the LockFile directive
# at a local disk. If you wish to share the same ServerRoot for multiple
# httpd daemons, you will need to change at least LockFile and PidFile.
#
ServerRoot "/usr/syno/apache"
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80
#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule xsendfile_module modules/mod_xsendfile.so
<IfModule !mpm_netware_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User nobody
Group nobody
</IfModule>
# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. admin@your-domain.com
#
ServerAdmin admin
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName *:80
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
#DocumentRoot "/var/services/web"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/services/web">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options MultiViews FollowSymLinks ExecCGI
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
<IfModule xsendfile_module>
XSendFile on
XSendFilePath /var/services/web/
SetEnv MOD_X_SENDFILE_ENABLED yes
</IfModule>
</Directory>
<Directory "/usr/syno/synoman/phpsrc/web">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options MultiViews FollowSymLinks ExecCGI
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
<IfModule xsendfile_module>
XSendFile on
XSendFilePath /
SetEnv MOD_X_SENDFILE_ENABLED yes
</IfModule>
</Directory>
<Directory "/usr/syno/synoman/empty/web">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options MultiViews FollowSymLinks ExecCGI
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.html index.htm index.cgi index.php index.php3
</IfModule>
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
#ErrorLog /var/log/httpd-error-user.log
ErrorLog /dev/null
TraceEnable off
#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
#LogLevel debug
LogLevel error
<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
#CustomLog /var/log/httpd-access-user.log combined
CustomLog /dev/null combined
#
# If you prefer a logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
#CustomLog logs/access_log combined
</IfModule>
<IfModule alias_module>
#
# Redirect: Allows you to tell clients about documents that used to
# exist in your server's namespace, but do not anymore. The client
# will make a new request for the document at its new location.
# Example:
# Redirect permanent /foo http://www.example.com/bar
#
# Alias: Maps web paths into filesystem paths and is used to
# access content that does not live under the DocumentRoot.
# Example:
# Alias /webpath /full/filesystem/path
#
# If you include a trailing / on /webpath then the server will
# require it to be present in the URL. You will also likely
# need to provide a <Directory> section to allow access to
# the filesystem path.
Alias /webman/pingpong.php /usr/syno/synoman/phpsrc/pingpong.php
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the target directory are treated as applications and
# run by the server when requested rather than as documents sent to the
# client. The same rules about trailing "/" apply to ScriptAlias
# directives as to Alias.
#
#ScriptAlias /cgi-bin/ "/usr/syno/apache/cgi-bin/"
</IfModule>
<IfModule cgid_module>
#
# ScriptSock: On threaded servers, designate the path to the UNIX
# socket used to communicate with the CGI daemon of mod_cgid.
#
#Scriptsock logs/cgisock
</IfModule>
#
# "/usr/syno/apache/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
#<Directory "/usr/syno/apache/cgi-bin">
# AllowOverride None
# Options None
# Order allow,deny
# Allow from all
#</Directory>
#
# DefaultType: the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain
<IfModule mime_module>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig /usr/syno/apache/conf/mime.types
#
# AddType allows you to add to or override the MIME configuration
# file specified in TypesConfig for specific file types.
#
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
#
AddEncoding x-compress Z
AddEncoding x-gzip gz tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
AddHandler cgi-script .cgi
# For type maps (negotiated resources):
#AddHandler type-map var
#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
AddType image/x-icon .ico
</IfModule>
#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type. The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
MIMEMagicFile /usr/syno/apache/conf/magic
<IfDefine HAVE_PHP>
#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
# Forbidden (eg. list files in a directory)
ErrorDocument 403 /webdefault/sample.php?status=403&from=user
# Page not found in apache
ErrorDocument 404 /webdefault/sample.php?status=404&from=user
# Page not found in thttpd
ErrorDocument 500 /webdefault/sample.php?status=500&from=user
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#
</IfDefine>
#
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall is used to deliver
# files. This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
#
EnableMMAP off
#EnableSendfile off
# Supplemental configuration
#
# The configuration files in the conf/extra/ directory can be
# included to add extra features or to modify the default configuration of
# the server, or you may simply copy their contents here and change as
# necessary.
# Server-pool management (MPM specific)
Include conf/extra/httpd-mpm.conf-user
# Multi-language error messages
#Include conf/extra/httpd-multilang-errordoc.conf
# Fancy directory listings
Include conf/extra/httpd-autoindex.conf-user
# Language settings
Include conf/extra/httpd-languages.conf-user
# User home directories
#Include conf/extra/httpd-userdir.conf
# Real-time info on requests and configuration
#Include conf/extra/httpd-info.conf
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
# Local access to the Apache HTTP Server Manual
#Include conf/extra/httpd-manual.conf
# Distributed authoring and versioning (WebDAV)
#Include conf/extra/httpd-dav.conf
# Various default settings
Include conf/extra/httpd-default.conf-user
<IfDefine SSL>
# Secure (SSL/TLS) connections
LoadModule ssl_module modules/mod_ssl.so
Include conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
# starting without SSL on platforms with no /dev/random equivalent
# but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
</IfDefine>
<IfDefine HAVE_PHP>
AddType application/x-httpd-php .php
LoadModule php5_module /lib/libphp5.so
</IfDefine>
LoadModule deflate_module modules/mod_deflate.so
<IfModule mod_deflate.c>
DeflateCompressionLevel 2
AddOutputFilterByType DEFLATE text/html text/plain text/xml
AddOutputFilter DEFLATE js css
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.[0678] no-gzip
BrowserMatch \bMSIE\s7 !no-gzip !gzip-only-text/html
</IfModule>
LoadModule headers_module modules/mod_headers.so
<Files *.js>
Header unset Etag
</Files>
<Files *.css>
Header unset Etag
</Files>
<VirtualHost *:80>
Include /usr/syno/etc/sites-enabled-user/*.conf
</VirtualHost>
NameVirtualHost *:80
<VirtualHost *:80>
ServerName nimi.eu
DocumentRoot /volume1/web
</VirtualHost> |
Märkasin, et Apache konfifailis on VirtualHost'id kusagilt imporditud (Include /usr/syno/etc/sites-enabled-user/*.conf). Ainuke fail, mis antud kaustas asub on SYNO.SDS.PhotoStation.conf, ning selle sisu on järgmine.
/usr/syno/etc/sites-enabled-user/SYNO.SDS.PhotoStation.conf
Spoiler 
<IfDefine HAVE_PHP>
AliasMatch ^/photo$ "/var/packages/PhotoStation/target/photo/"
Alias /photo/ "/var/packages/PhotoStation/target/photo/"
AliasMatch ^/blog$ "/var/packages/PhotoStation/target/photo/blog/"
Alias /blog/ "/var/packages/PhotoStation/target/photo/blog/"
RedirectMatch ^/blog/include/v(.*) /photo/get_video.php?$1
AliasMatch ^/~([^\/]*)/photo$ "/var/packages/PhotoStation/target/photo/"
AliasMatch ^/~([^\/]*)/photo/(.*) "/var/packages/PhotoStation/target/photo/$2"
AliasMatch ^/~([^\/]*)/blog$ "/var/packages/PhotoStation/target/photo/blog/"
AliasMatch ^/~([^\/]*)/blog/(.*) "/var/packages/PhotoStation/target/photo/blog/$2"
RedirectMatch ^/~([^\/]*)/blog/include/v(.*) /~$1/photo/get_video.php?$2
<Directory "/var/packages/PhotoStation/target/photo">
php_admin_value open_basedir none
</Directory>
</IfDefine>
<IfDefine !HAVE_PHP>
AliasMatch ^/photo$ "/usr/syno/synoman/empty/photo/"
Alias /photo/ "/usr/syno/synoman/empty/photo/"
AliasMatch ^/blog$ "/usr/syno/synoman/empty/blog/"
Alias /blog/ "/usr/syno/synoman/empty/blog/"
RedirectMatch ^/blog/include/v(.*) /photo/get_video.php?$1
AliasMatch ^/~([^\/]*)/photo$ "/usr/syno/synoman/empty/photo/"
AliasMatch ^/~([^\/]*)/photo/(.*) "/usr/syno/synoman/empty/photo/$2"
AliasMatch ^/~([^\/]*)/blog$ "/usr/syno/synoman/empty/blog/"
AliasMatch ^/~([^\/]*)/blog/(.*) "/usr/syno/synoman/empty/blog/$2"
RedirectMatch ^/~([^\/]*)/blog/include/v(.*) /~$1/photo/get_video.php?$2
</IfDefine>
<Directory "/var/services/photo">
Options MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory> |
|
|
Kommentaarid: 458 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
388 |
|
tagasi üles |
|
 |
tomes
HV kasutaja
liitunud: 22.01.2009
|
01.05.2013 23:08:19
|
|
|
Ja kasutajaid on mitu, st "~Kasutajanimi" muutub? Sel juhul - mille alusel peaks album.nimi.eu otsustama, millist sisu näidata?
Kui kasutajaid on rohkem kui üks, siis võib mod_rewrite abil lahedada nii, et nimi.eu/~kasutaja/photo = nimi.eu/kasutaja
|
|
Kommentaarid: 64 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
58 |
|
tagasi üles |
|
 |
Vahur
HV Guru

liitunud: 01.10.2006
|
01.05.2013 23:15:45
|
|
|
Domeen on selle kasutaja nimeline, kellele vaja sellist alamdomeeni teha. Võib ka nii olla, et staatiliselt ära määrata, et just selle kasutaja albumi aadress ainult nii ära lahenduks.
Või siis kui selline asi tõesti võimalik pole, siis võib olla ka nimi.eu/album aadressiks.
|
|
Kommentaarid: 458 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
388 |
|
tagasi üles |
|
 |
tomes
HV kasutaja
liitunud: 22.01.2009
|
|
Kommentaarid: 64 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
58 |
|
tagasi üles |
|
 |
Le Inc
HV Guru

liitunud: 06.09.2002
|
05.05.2013 10:45:24
|
|
|
link :: Jobsworth rdoc
Mässasin jobsworth ubuntule installimisega (kahjuks senimaani ebaõnnestunult) kus ka saab virtualhost'i määrata (ei pea). Igatahes sain v-hosti tööle. Apache2 conf:
tsitaat: |
<VirtualHost *:80>
ServerName jobsworth.example.com.au
RailsEnv production
PassengerHighPerformance on
DocumentRoot /usr/local/www/jobsworth/public
CustomLog /var/log/www/myserver.example.com.au-access_log combined
ErrorLog /var/log/www/myserver.example.com.au-access_log
</VirtualHost>
|
tsitaat: |
<Directory /usr/local/www/jobsworth/public>
AllowOverride All
Options -MultiViews
Order allow,deny
Allow from all
</Directory>
|
Siit peaks idee välja rulluma. Peale apache conf'i reload peaks sites-enabled confifail ilmuma sites available kataloogi. Peale seda peaks asi funkama küll.
|
|
Kommentaarid: 56 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
54 |
|
tagasi üles |
|
 |
|