Portaal Portaal Pingviini veeb foorumi pealeht
  Viki  |  IRC  |  Otsing  |  Küsimused ja vastused  |  Profiil  |  Privaatsõnumite vaatamiseks logi sisse  | Logi sisse või Registreeru
<empty>
Vaata järgmist teemat
Vaata eelmist teemat

Postita uus teemaVasta teemale
Autor Sõnum
-IFFI-
Vana Pingviin
Vana Pingviin


Vanus: 47
Liitunud: 25.06.2005
Postitused: 1411
Asukoht: Lappeenranta-Turku
Distributsioon: Linux MX
finland.gif
postituspostitatud: 14.01.2012, 04:04  postituse pealkiri:  Kuidas luua sub-domain-i kasutades webmini?  

Oleks vaja testimiseks luua alamdomeen näiteks kujul "uus.sait.com" Olemas siis on peadomeen "sait.com" ja VPS. Apache ja muu sellise näpimiseks Kasutan Webmini.

Hiljem tahaks selle alamdomeenil oleva saidi suunata tagasi peadomeenile. Kui hetkel testida domeenil "sait.com/uus" siis hiljem sealt tagasi suunata on vist raskem Confused

Kasutusel siis vps ja renditud domeen.

Cpanelis on asi lihtne kuid kahjuks mul selline luksus puudub serveris.

Oskab keegi miskit tarka soovitada?


obundra
Vana Pingviin
Vana Pingviin


Vanus: 49
Liitunud: 04.08.2005
Postitused: 1213
Asukoht: 127.0.0.1
Distributsioon: RHEL, Solaris, Debian, Gentoo
estonia.gif
postituspostitatud: 14.01.2012, 12:16  postituse pealkiri:  (teema puudub)  

Kui veebiserverile alamdomeeni, siis Webminis teed Apache all uue virtualhosti, millel oma documentroot ja nimi uus.sait.com.Praeguse sait.comi pead ka virtualhostiks tegema kui ta on praegu niisama default konfiga.Nimeserveris peab ka olema kirje uus.sait.com, mis suunab su ip peale.Veebiserveris saad alamdomeenilt peadomeenile vajadusel suunata näiteks mod_rewrite abiga rewrite_rule tehes.
Apache konfis näeb asi välja umbes selline
Kood:

<VirtualHost *:80>
 ServerName www.sait.com
 ServerAlias  sait.com
 ServerAdmin me@sait.com
 DocumentRoot /data/sait/www
</VirtualHost>

<VirtualHost *:80>
 ServerName uus.sait.com
 ServerAdmin me@sait.com
 DocumentRoot /data/sait/uussait
</VirtualHost>

_________________
IT teenused

-IFFI-
Vana Pingviin
Vana Pingviin


Vanus: 47
Liitunud: 25.06.2005
Postitused: 1411
Asukoht: Lappeenranta-Turku
Distributsioon: Linux MX
finland.gif
postituspostitatud: 14.01.2012, 17:27  postituse pealkiri:  (teema puudub)  

Asi läks nuid veidi keeruliseks. Hetkel proovisin siis nii, et tegin webminis uue suvalise virtual hosti ja siis kustutasin seal olevad kirjed ning asendasin sinu antud kirjetega (loomulikult oma õigete domenidega) ja kui üritasin seda kola salvestada sisi sain miski errori. Kustutasin äsja loodud virtual hosti ja sain käivitada uuesti apache.

Kas saan aru õigesti, et see osa

Kood:
<VirtualHost *:80>
 ServerName www.sait.com
 ServerAlias  sait.com
 ServerAdmin me@sait.com
 DocumentRoot /data/sait/www
</VirtualHost>
tuleb asendada default serveri kirjetega ning
see osa tuleb lisada uute loodavasse virtual hosti
Kood:

<VirtualHost *:80>
 ServerName uus.sait.com
 ServerAdmin me@sait.com
 DocumentRoot /data/sait/uussait
</VirtualHost>


Hetkel on mul webminis see virtual hostide osa selline
Image

ja uue hosti loomisel on pilt järgmine
Image

Et mida kuhu lahtri kirjutada mai tea, olen proovinud nii ja naa... Crying or Very sad

Rääkisid ka nimeserevritest. Kuna domen on soetatud godaddy.com-ist siis seega on mul nimeserverid seal control panelist paika pandud ja IP-le suunatud. Kas võimalik ka miskit muuta/suunata seal ei ole võimalik???


spott
Admin
Admin


Vanus: 43
Liitunud: 04.06.2005
Postitused: 8854

Distributsioon: Ubuntu
estonia.gif
postituspostitatud: 15.01.2012, 09:15  postituse pealkiri:  (teema puudub)  

sul virtualmin on muidu paigaldatud ikka?

_________________
Tellige endale sünnipäevaks, sõbrapäevaks või muuks tähtpäevaks kingitus: Kingitused internetist - NetiKink.eu

-IFFI-
Vana Pingviin
Vana Pingviin


Vanus: 47
Liitunud: 25.06.2005
Postitused: 1411
Asukoht: Lappeenranta-Turku
Distributsioon: Linux MX
finland.gif
postituspostitatud: 15.01.2012, 10:20  postituse pealkiri:  (teema puudub)  

Ei seda mul küljes pole veel...

Uurisin veidi documentationi ja see tahab saada omaette partitione...pean ilmselt selle siis eraldi installima nagu dual boot siis ilmselt Confused

Oleks võimalus kasutada Cpaneli. Kui ma läbi selle loon omale alamdomeeni kas see salvestub mul süsteemi seadetesse ja hiljem ära ei kao kui Cpanel ära võetakse?


spott
Admin
Admin


Vanus: 43
Liitunud: 04.06.2005
Postitused: 8854

Distributsioon: Ubuntu
estonia.gif
postituspostitatud: 16.01.2012, 06:57  postituse pealkiri:  (teema puudub)  

virtualmin ei vaja mingit eraldi partitsiooni.
Kuid selle abil sul veebiserveri haldamine tunduvalt lihtsam. Virtualmin just mõeldudki selleks - tegu siis virtuaalserverite halduseks mõeldud Webmini mooduliga.

_________________
Tellige endale sünnipäevaks, sõbrapäevaks või muuks tähtpäevaks kingitus: Kingitused internetist - NetiKink.eu

-IFFI-
Vana Pingviin
Vana Pingviin


Vanus: 47
Liitunud: 25.06.2005
Postitused: 1411
Asukoht: Lappeenranta-Turku
Distributsioon: Linux MX
finland.gif
postituspostitatud: 16.01.2012, 18:05  postituse pealkiri:  (teema puudub)  

Sain siis pika nikerdamise peale Virtualmin-i külge ning kogu krempel on siis poolel teel.

Kasutan järgmist õpetust LINK

Olen hetkel 6.step-s juures ja ei saa sealt enam edasi. Nimelt terminalis väidab, et puudub "suexec" kataloom või miskit taolist.

Terminali väljund:
Kood:

# apt-get install apache2-suexec-custom
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed
  apache2-suexec-custom
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 97.4kB of archives.
After this operation, 209kB of additional disk space will be used.
Get: 1 http://us.archive.ubuntu.com/ubuntu/ lucid-updates/universe apache2-suexec-custom 2.2.14-5ubuntu8.7 [97.4kB]
Fetched 97.4kB in 0s (603kB/s)               
Selecting previously deselected package apache2-suexec-custom.
(Reading database ... 56706 files and directories currently installed.)
Unpacking apache2-suexec-custom (from .../apache2-suexec-custom_2.2.14-5ubuntu8.7_amd64.deb) ...
Processing triggers for man-db ...
Setting up apache2-suexec-custom (2.2.14-5ubuntu8.7) ...
# cd /etc/apache2/suexec
/etc/apache2/suexec# nano www-data
/etc/apache2/suexec# /etc/apache2/suexec# apache2ctl restart
-bash: /etc/apache2/suexec#: No such file or directory



WWW-DATA kataloomas kästi teha järgmist

Tsitaat:
replace the line "/var/www" with "/home" (without "" ). hit control-x then y then enter


Hetkel on siis seal järgmine sisu
Kood:

/home
public_html/cgi-bin
# The first two lines contain the suexec document root and the suexec userdir
# suffix. Both features can be disabled separately by prepending a # character.
# This config file is only used by the apache2-suexec-custom package.



Kuna ma ei saa restartida seda siis ei sa ka ma edasi seadistada virtualmini.

Servus istub buntu 10.04. Kus,milles, võiks viga peituda?




Viimati muutis -IFFI- 04.03.2012, 10:34; muudetud 1 kord
obundra
Vana Pingviin
Vana Pingviin


Vanus: 49
Liitunud: 04.08.2005
Postitused: 1213
Asukoht: 127.0.0.1
Distributsioon: RHEL, Solaris, Debian, Gentoo
estonia.gif
postituspostitatud: 17.01.2012, 02:29  postituse pealkiri:  (teema puudub)  

Sa üritad anda käsku
Kood:
/etc/apache2/suexec# apache2ctl restart

, ütle lihtsalt
Kood:
apache2ctl restart

konfi õigsust saad kontrollida
Kood:
apache2ctl -t või
apache2ctl configtest

_________________
IT teenused

-IFFI-
Vana Pingviin
Vana Pingviin


Vanus: 47
Liitunud: 25.06.2005
Postitused: 1411
Asukoht: Lappeenranta-Turku
Distributsioon: Linux MX
finland.gif
postituspostitatud: 17.01.2012, 08:37  postituse pealkiri:  (teema puudub)  

Kogu sinu antud varjantide peale sain järgnevad vastused, et VirtualHosti pole olemas. Eks ta vist õige on kah kuna ma ei sa ju seda ennem luua kui virtualmin on paigas.

Terminali väljund:
Kood:

Last login: Mon Jan 16 00:20:34 2012 from 80-186-218-17.elisa-mobile.fi
# apache2ctl restart
[Tue Jan 17 07:31:06 2012] [warn] NameVirtualHost 188.165.221.75:0 has no VirtualHosts
# apache2ctl -t
[Tue Jan 17 07:31:59 2012] [warn] NameVirtualHost 188.165.221.75:0 has no VirtualHosts
Syntax OK
# apache2ctl configtest
[Tue Jan 17 07:32:23 2012] [warn] NameVirtualHost 188.165.221.75:0 has no VirtualHosts
Syntax OK


Ilmselt pean looma miski virtualhosti ennem aga kuidas ma saan seda teha kui virtual min pole paigas...




Viimati muutis -IFFI- 04.03.2012, 10:35; muudetud 1 kord
obundra
Vana Pingviin
Vana Pingviin


Vanus: 49
Liitunud: 04.08.2005
Postitused: 1213
Asukoht: 127.0.0.1
Distributsioon: RHEL, Solaris, Debian, Gentoo
estonia.gif
postituspostitatud: 17.01.2012, 11:48  postituse pealkiri:  (teema puudub)  

Veateade tuleb ilmselt sellest, et kuskil Apache konfifailis või mitme konfifaili peale kokku mitu "NameVirtualHost" rida.Muuda konfi nii, et oleks ainult üks selline rida.Jäta näiteks ainult ports.conf-i rida NameVirtualHost *:80 ja mujalt konfifailidest korista NameVirtualHost ära.Vaatamata sellele hoiatusele Apache tegelikult läheb käima.Lisaks paistab veateatest nagu oleks vhost 0 pordi peale sätitud, kuigi siis peaks veateade teistsugune olema.

_________________
IT teenused

-IFFI-
Vana Pingviin
Vana Pingviin


Vanus: 47
Liitunud: 25.06.2005
Postitused: 1411
Asukoht: Lappeenranta-Turku
Distributsioon: Linux MX
finland.gif
postituspostitatud: 17.01.2012, 12:37  postituse pealkiri:  (teema puudub)  

Apache conf on mul selline /etc/apache2/apache2.conf Ja lõpus on vaid üks "NameVirtualHost" rida
Kood:

#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives.
#
# 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. 
#
# The configuration directives are grouped into three basic sections:
#  1. Directives that control the operation of the Apache server process as a
#     whole (the 'global environment').
#  2. Directives that define the parameters of the 'main' or 'default' server,
#     which responds to requests that aren't handled by a virtual host.
#     These directives also provide default values for the settings
#     of all virtual hosts.
#  3. Settings for virtual hosts, which allow Web requests to be sent to
#     different IP addresses or hostnames and have them handled by the
#     same Apache server process.
#
# 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 "/var/log/apache2/foo.log"
# with ServerRoot set to "" will be interpreted by the
# server as "//var/log/apache2/foo.log".
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation (available
# at <URL:http://httpd.apache.org/docs-2.1/mod/mpm_common.html#lockfile>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
#<IfModule !mpm_winnt.c>
#<IfModule !mpm_netware.c>
LockFile /var/lock/apache2/accept.lock
#</IfModule>
#</IfModule>

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

##
## Server-Pool Size Regulation (MPM specific)
##

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_worker_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>

# event MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_event_module>
    StartServers          2
    MaxClients          150
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxRequestsPerChild   0
</IfModule>

# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#

AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy all
</Files>

#
# DefaultType is 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


#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

# 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/apache2/error.log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf

# Include all the user configurations:
Include /etc/apache2/httpd.conf

# Include ports listing
Include /etc/apache2/ports.conf

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
# If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

#
# Define an access log for VirtualHosts that don't define their own logfile
CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined


# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
Include /etc/apache2/conf.d/

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/
NameVirtualHost 253.178.228.75



Include /etc/apache2/sites-enabled/ sellist faili mul polegi Confused

/etc/apache2/ports.conf näeb välja järgmine
Kood:

Listen 80
Listen 11111
<IfModule mod_ssl.c>
Listen 443
Listen 253.178.228.75:8080
Listen 253.178.228.75:90
</IfModule>


Ja kui vaadata webminis mu virtual hoste siis on pilt selline ja neid kõiki on ka vaja
Image


obundra
Vana Pingviin
Vana Pingviin


Vanus: 49
Liitunud: 04.08.2005
Postitused: 1213
Asukoht: 127.0.0.1
Distributsioon: RHEL, Solaris, Debian, Gentoo
estonia.gif
postituspostitatud: 18.01.2012, 01:50  postituse pealkiri:  (teema puudub)  

Kirjuta konfi lõpus sellele ip-le port ka juurde, muidu annab viga.Ülejäänud vhostide konfid peaks asuma /etc/apache2/conf.d/ kaustas, vaata need ka üle.

_________________
IT teenused

Näita (aja järgi):      
Postita uus teemaVasta teemale


Vaata järgmist teemat
Vaata eelmist teemat
Powered by phpBB2 Plus based on phpBB © 2001/7 phpBB Group