Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › A few questions regarding server things
New Posts  All Forums:Forum Nav:

A few questions regarding server things

post #1 of 13
Thread Starter 
OK so I bought server space. I have created http://www.matthewdanisphotography.com/ (it's not nearly done yet, haters).

Now I have uploaded my index.html to ftp.matthewdanisphotography.com/public_html/. Everything went fine. Now I have uploaded my css stylesheet to the same directory.

I have a test index.html on my desktop to, um, test. I opened it up in chrome without specifying where my css stylesheet is. Everything popped up without a style. I then specified (in the test index.html) where I placed my css stylesheet (ftp.matthewdanisphotography.com/public_html/all.css). I then refreshed my index.html. This time (as expected) it had a style! Cool, so I then tried logging in to my ftp... and it asked me for my password. So I entered my password. 5 seconds later, it asks me for my password... So I enter my password. Again, it asks me for my password 5 seconds later. So now I'm thinking, "OK, somethings up". I refreshed my test index.html, and it was again un-styled... Someone please tell me why. Am I not supposed to put my style sheet there? I mean it's in a public file and it worked fine the first time...

So after typing this, I tried logging in to my ftp. It didn't ask me a million times to enter my password. I ended up logging in. So I refreshed my test index.html to see if it could access the stylesheet, it did. I then went back to my ftp and it asked me for my password, I entered it, it asked for it again, etc... Refreshed my test index.html; un-styled. Now I'm assuming that there is some random down time with my ftp. I'm also assuming that someone viewing my website needs to be logged in to be able for my test index.html to access my stylesheet. Is this correct?

Tl;dr

Where should I upload my css stylesheet?

Thanks you very much, this is really pissing me off.
Parvum
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 6700k Gigabyte Z170X-Gaming 6 2x Gigabyte GTX 1080 G1 16GB DDR4 
Hard DriveOSMonitorKeyboard
Samsung 512GB M.2 950 Pro NVMe Windows 10 Dell 1440p Pok3r 
PowerCaseMouseMouse Pad
EVGA 750GQ Parvum M1.0 Logitech G9X Corsair 
  hide details  
Reply
Parvum
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 6700k Gigabyte Z170X-Gaming 6 2x Gigabyte GTX 1080 G1 16GB DDR4 
Hard DriveOSMonitorKeyboard
Samsung 512GB M.2 950 Pro NVMe Windows 10 Dell 1440p Pok3r 
PowerCaseMouseMouse Pad
EVGA 750GQ Parvum M1.0 Logitech G9X Corsair 
  hide details  
Reply
post #2 of 13
Well if your having issues logging in through your ftp you can use a client that will log in to your ftp and you can upload your files through that. I don't use them so I can't recommend. But maybe your host mentions one on your cpanel?

As for your css file.. it can be in any directory you wish, but then you need to direct it in the href="location".

I would leave your css file in the same directory as your html until you get used to coding so then all u need is href="all.css" and not href="..all.css" or href="style/all.css"

Hope that helps

Sent from my Droid using Tapatalk
post #3 of 13
Thread Starter 
Quote:
Originally Posted by JMattes;14664455 
As for your css file.. it can be in any directory you wish, but then you need to direct it in the href="location".

I would leave your css file in the same directory as your html until you get used to coding so then all u need is href="all.css" and not href="..all.css" or href="style/all.css"

Hope that helps

Sent from my Droid using Tapatalk

OK so then it doesn't matter where I put it. Why then am I unable to access it 100% of the time. I mean the css sheet is in the same folder as my index.html and I can access that 100% of the time.

OK, so I updated my index.html to include the address to the css style sheet. It's not perfect as I still need to make some edits to the style sheet (as a few things are off) but it's just there to test some things out. Anyway, when going to my website, I'm asked to log in to my ftp account. Not sure why this is.

http://www.matthewdanisphotography.com/ Can somebody go to my website and see if they need to log in to my ftp account in order access my website?
Edited by xdanisx - 8/21/11 at 12:42pm
Parvum
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 6700k Gigabyte Z170X-Gaming 6 2x Gigabyte GTX 1080 G1 16GB DDR4 
Hard DriveOSMonitorKeyboard
Samsung 512GB M.2 950 Pro NVMe Windows 10 Dell 1440p Pok3r 
PowerCaseMouseMouse Pad
EVGA 750GQ Parvum M1.0 Logitech G9X Corsair 
  hide details  
Reply
Parvum
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 6700k Gigabyte Z170X-Gaming 6 2x Gigabyte GTX 1080 G1 16GB DDR4 
Hard DriveOSMonitorKeyboard
Samsung 512GB M.2 950 Pro NVMe Windows 10 Dell 1440p Pok3r 
PowerCaseMouseMouse Pad
EVGA 750GQ Parvum M1.0 Logitech G9X Corsair 
  hide details  
Reply
post #4 of 13
Another thing - have you made sure the permissions are set so people trying to access your site can't go wandering around your site's directories?

EDIT: also, what FTP client are you using?

EDIT 2:
Code:
<link rel="stylesheet" type="text/css" href="style.css" />

That's how I have a css referred to in the same directory as my index.html
Edited by Quantum Reality - 8/21/11 at 12:34pm
4690K System
(12 items)
 
HTPC
(9 items)
 
HP dv6 laptop
(13 items)
 
CPUMotherboardGraphicsRAM
Core i5 4690K ASRock Z97 Extreme4 XFX Radeon 7950 32 GB DDR3-2133 
Hard DriveOptical DriveCoolingOS
Samsung 850 EVO SSD Samsung DVD/CD-writer Corsair Hydro H60 Windows 7 
MonitorMonitorPowerCase
ASUS PA248Q Dell U2412M XFX 850W Black Edition XXX Fractal Design Arc Midi 2 
CPUMotherboardGraphicsRAM
Pentium Dual Core E6700 MSI G41M-P33 Combo ATI HD4350 Kingston ValueRAM DDR3-1333 
RAMHard DriveOSMonitor
Kingston ValueRAM DDR3-1333 WD Caviar Blue Windows 7 64-bit Sony 32" TV set 
Case
Apex TX-381 
CPUGraphicsRAMHard Drive
Core i5 430M GT230M (1 Gb dedicated) 8 GB DDR3-1066 640 GB 
OSMonitor
Windows 7 Home Premium (64-bit) 15.6" 
  hide details  
Reply
4690K System
(12 items)
 
HTPC
(9 items)
 
HP dv6 laptop
(13 items)
 
CPUMotherboardGraphicsRAM
Core i5 4690K ASRock Z97 Extreme4 XFX Radeon 7950 32 GB DDR3-2133 
Hard DriveOptical DriveCoolingOS
Samsung 850 EVO SSD Samsung DVD/CD-writer Corsair Hydro H60 Windows 7 
MonitorMonitorPowerCase
ASUS PA248Q Dell U2412M XFX 850W Black Edition XXX Fractal Design Arc Midi 2 
CPUMotherboardGraphicsRAM
Pentium Dual Core E6700 MSI G41M-P33 Combo ATI HD4350 Kingston ValueRAM DDR3-1333 
RAMHard DriveOSMonitor
Kingston ValueRAM DDR3-1333 WD Caviar Blue Windows 7 64-bit Sony 32" TV set 
Case
Apex TX-381 
CPUGraphicsRAMHard Drive
Core i5 430M GT230M (1 Gb dedicated) 8 GB DDR3-1066 640 GB 
OSMonitor
Windows 7 Home Premium (64-bit) 15.6" 
  hide details  
Reply
post #5 of 13
Thread Starter 
This is how I referred my css stylesheet:
Quote:

Now I'm not sure if that's the link I should use. When I go to my website, index.html is at www.matthewdanisphotography.com/public_html/index.html not ftp://ftp.matthewdanisphotography.com/public_html/index.html. So it would only make sense to link to www.matthewdanisphotography.com/public_html/index.html, however, that doesn't seam to work... Now linking to ftp://ftp.matthewdanisphotography.com does work, but I believe that someone would need to log into my ftp account to use the stylesheet. This is why I think I either linked it wrong or just put it in the wrong place.

I'm really new to this if you couldn't tell already. biggrin.gif
Edited by xdanisx - 8/21/11 at 1:24pm
Parvum
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 6700k Gigabyte Z170X-Gaming 6 2x Gigabyte GTX 1080 G1 16GB DDR4 
Hard DriveOSMonitorKeyboard
Samsung 512GB M.2 950 Pro NVMe Windows 10 Dell 1440p Pok3r 
PowerCaseMouseMouse Pad
EVGA 750GQ Parvum M1.0 Logitech G9X Corsair 
  hide details  
Reply
Parvum
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 6700k Gigabyte Z170X-Gaming 6 2x Gigabyte GTX 1080 G1 16GB DDR4 
Hard DriveOSMonitorKeyboard
Samsung 512GB M.2 950 Pro NVMe Windows 10 Dell 1440p Pok3r 
PowerCaseMouseMouse Pad
EVGA 750GQ Parvum M1.0 Logitech G9X Corsair 
  hide details  
Reply
post #6 of 13
Change href="ftp://ftp.matthewdanisphotography.com/css/all.css"

to

href="css/all.css"

Then refresh the page in your browser and see if it still asks for your ftp login and pw.
4690K System
(12 items)
 
HTPC
(9 items)
 
HP dv6 laptop
(13 items)
 
CPUMotherboardGraphicsRAM
Core i5 4690K ASRock Z97 Extreme4 XFX Radeon 7950 32 GB DDR3-2133 
Hard DriveOptical DriveCoolingOS
Samsung 850 EVO SSD Samsung DVD/CD-writer Corsair Hydro H60 Windows 7 
MonitorMonitorPowerCase
ASUS PA248Q Dell U2412M XFX 850W Black Edition XXX Fractal Design Arc Midi 2 
CPUMotherboardGraphicsRAM
Pentium Dual Core E6700 MSI G41M-P33 Combo ATI HD4350 Kingston ValueRAM DDR3-1333 
RAMHard DriveOSMonitor
Kingston ValueRAM DDR3-1333 WD Caviar Blue Windows 7 64-bit Sony 32" TV set 
Case
Apex TX-381 
CPUGraphicsRAMHard Drive
Core i5 430M GT230M (1 Gb dedicated) 8 GB DDR3-1066 640 GB 
OSMonitor
Windows 7 Home Premium (64-bit) 15.6" 
  hide details  
Reply
4690K System
(12 items)
 
HTPC
(9 items)
 
HP dv6 laptop
(13 items)
 
CPUMotherboardGraphicsRAM
Core i5 4690K ASRock Z97 Extreme4 XFX Radeon 7950 32 GB DDR3-2133 
Hard DriveOptical DriveCoolingOS
Samsung 850 EVO SSD Samsung DVD/CD-writer Corsair Hydro H60 Windows 7 
MonitorMonitorPowerCase
ASUS PA248Q Dell U2412M XFX 850W Black Edition XXX Fractal Design Arc Midi 2 
CPUMotherboardGraphicsRAM
Pentium Dual Core E6700 MSI G41M-P33 Combo ATI HD4350 Kingston ValueRAM DDR3-1333 
RAMHard DriveOSMonitor
Kingston ValueRAM DDR3-1333 WD Caviar Blue Windows 7 64-bit Sony 32" TV set 
Case
Apex TX-381 
CPUGraphicsRAMHard Drive
Core i5 430M GT230M (1 Gb dedicated) 8 GB DDR3-1066 640 GB 
OSMonitor
Windows 7 Home Premium (64-bit) 15.6" 
  hide details  
Reply
post #7 of 13
Oh, one other thing

Is your webhost running Linux? If so set the permissions to group, and other READ ENABLE on all your webhosted files.

(By default I believe they are user read-write-execute only and blanked fior the others)

If you can ssh in, then you use the chmod as follows
Code:
chmod go+r *

IN THE DIRECTORY OF YOUR INDEX.HTML only.

If you cannot, see if your ftp client can set those permissions for you.
4690K System
(12 items)
 
HTPC
(9 items)
 
HP dv6 laptop
(13 items)
 
CPUMotherboardGraphicsRAM
Core i5 4690K ASRock Z97 Extreme4 XFX Radeon 7950 32 GB DDR3-2133 
Hard DriveOptical DriveCoolingOS
Samsung 850 EVO SSD Samsung DVD/CD-writer Corsair Hydro H60 Windows 7 
MonitorMonitorPowerCase
ASUS PA248Q Dell U2412M XFX 850W Black Edition XXX Fractal Design Arc Midi 2 
CPUMotherboardGraphicsRAM
Pentium Dual Core E6700 MSI G41M-P33 Combo ATI HD4350 Kingston ValueRAM DDR3-1333 
RAMHard DriveOSMonitor
Kingston ValueRAM DDR3-1333 WD Caviar Blue Windows 7 64-bit Sony 32" TV set 
Case
Apex TX-381 
CPUGraphicsRAMHard Drive
Core i5 430M GT230M (1 Gb dedicated) 8 GB DDR3-1066 640 GB 
OSMonitor
Windows 7 Home Premium (64-bit) 15.6" 
  hide details  
Reply
4690K System
(12 items)
 
HTPC
(9 items)
 
HP dv6 laptop
(13 items)
 
CPUMotherboardGraphicsRAM
Core i5 4690K ASRock Z97 Extreme4 XFX Radeon 7950 32 GB DDR3-2133 
Hard DriveOptical DriveCoolingOS
Samsung 850 EVO SSD Samsung DVD/CD-writer Corsair Hydro H60 Windows 7 
MonitorMonitorPowerCase
ASUS PA248Q Dell U2412M XFX 850W Black Edition XXX Fractal Design Arc Midi 2 
CPUMotherboardGraphicsRAM
Pentium Dual Core E6700 MSI G41M-P33 Combo ATI HD4350 Kingston ValueRAM DDR3-1333 
RAMHard DriveOSMonitor
Kingston ValueRAM DDR3-1333 WD Caviar Blue Windows 7 64-bit Sony 32" TV set 
Case
Apex TX-381 
CPUGraphicsRAMHard Drive
Core i5 430M GT230M (1 Gb dedicated) 8 GB DDR3-1066 640 GB 
OSMonitor
Windows 7 Home Premium (64-bit) 15.6" 
  hide details  
Reply
post #8 of 13
Thread Starter 
Quote:
Originally Posted by Quantum Reality;14665291 
Change href="ftp://ftp.matthewdanisphotography.com/css/all.css"

to

href="css/all.css"

Then refresh the page in your browser and see if it still asks for your ftp login and pw.

1. I messed up in my post. The link is at public_html/all.css not css/all.css.

2. Anyways, I used
Quote:

Didn't ask my for my password, however the stylesheet didn't work either.
Parvum
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 6700k Gigabyte Z170X-Gaming 6 2x Gigabyte GTX 1080 G1 16GB DDR4 
Hard DriveOSMonitorKeyboard
Samsung 512GB M.2 950 Pro NVMe Windows 10 Dell 1440p Pok3r 
PowerCaseMouseMouse Pad
EVGA 750GQ Parvum M1.0 Logitech G9X Corsair 
  hide details  
Reply
Parvum
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 6700k Gigabyte Z170X-Gaming 6 2x Gigabyte GTX 1080 G1 16GB DDR4 
Hard DriveOSMonitorKeyboard
Samsung 512GB M.2 950 Pro NVMe Windows 10 Dell 1440p Pok3r 
PowerCaseMouseMouse Pad
EVGA 750GQ Parvum M1.0 Logitech G9X Corsair 
  hide details  
Reply
post #9 of 13
Thread Starter 
Quote:
Originally Posted by Quantum Reality;14665361 
Oh, one other thing

Is your webhost running Linux? If so set the permissions to group, and other READ ENABLE on all your webhosted files.

(By default I believe they are user read-write-execute only and blanked fior the others)

If you can ssh in, then you use the chmod as follows
Code:
chmod go+r *

IN THE DIRECTORY OF YOUR INDEX.HTML only.

If you cannot, see if your ftp client can set those permissions for you.

Not sure if it's running on linux. I'm using hostbig.com.
Parvum
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 6700k Gigabyte Z170X-Gaming 6 2x Gigabyte GTX 1080 G1 16GB DDR4 
Hard DriveOSMonitorKeyboard
Samsung 512GB M.2 950 Pro NVMe Windows 10 Dell 1440p Pok3r 
PowerCaseMouseMouse Pad
EVGA 750GQ Parvum M1.0 Logitech G9X Corsair 
  hide details  
Reply
Parvum
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 6700k Gigabyte Z170X-Gaming 6 2x Gigabyte GTX 1080 G1 16GB DDR4 
Hard DriveOSMonitorKeyboard
Samsung 512GB M.2 950 Pro NVMe Windows 10 Dell 1440p Pok3r 
PowerCaseMouseMouse Pad
EVGA 750GQ Parvum M1.0 Logitech G9X Corsair 
  hide details  
Reply
post #10 of 13
Ok, backuppasec.

If you have a FLAT FILE layout for your html stuff so far -- as in the example
Code:
6: testuser% ls -al
total 7632
drwxr-xr-x   2 testuser  users       4096 Aug 14 19:46 .
drwxr-xr-x  10 testuser  users       4096 Aug 13 15:34 ..
-rw-r--r--   1 testuser  users       2031 Aug 14 19:48 index.html
-rw-r--r--   1 testuser  users        552 Aug  9 10:29 all.css

Then you would do this in your index.html
Code:
href="all.css"

If your layout is HIERARCHICAL then you would specify the location RELATIVE to your index.html with a folder name.

Get the idea?
4690K System
(12 items)
 
HTPC
(9 items)
 
HP dv6 laptop
(13 items)
 
CPUMotherboardGraphicsRAM
Core i5 4690K ASRock Z97 Extreme4 XFX Radeon 7950 32 GB DDR3-2133 
Hard DriveOptical DriveCoolingOS
Samsung 850 EVO SSD Samsung DVD/CD-writer Corsair Hydro H60 Windows 7 
MonitorMonitorPowerCase
ASUS PA248Q Dell U2412M XFX 850W Black Edition XXX Fractal Design Arc Midi 2 
CPUMotherboardGraphicsRAM
Pentium Dual Core E6700 MSI G41M-P33 Combo ATI HD4350 Kingston ValueRAM DDR3-1333 
RAMHard DriveOSMonitor
Kingston ValueRAM DDR3-1333 WD Caviar Blue Windows 7 64-bit Sony 32" TV set 
Case
Apex TX-381 
CPUGraphicsRAMHard Drive
Core i5 430M GT230M (1 Gb dedicated) 8 GB DDR3-1066 640 GB 
OSMonitor
Windows 7 Home Premium (64-bit) 15.6" 
  hide details  
Reply
4690K System
(12 items)
 
HTPC
(9 items)
 
HP dv6 laptop
(13 items)
 
CPUMotherboardGraphicsRAM
Core i5 4690K ASRock Z97 Extreme4 XFX Radeon 7950 32 GB DDR3-2133 
Hard DriveOptical DriveCoolingOS
Samsung 850 EVO SSD Samsung DVD/CD-writer Corsair Hydro H60 Windows 7 
MonitorMonitorPowerCase
ASUS PA248Q Dell U2412M XFX 850W Black Edition XXX Fractal Design Arc Midi 2 
CPUMotherboardGraphicsRAM
Pentium Dual Core E6700 MSI G41M-P33 Combo ATI HD4350 Kingston ValueRAM DDR3-1333 
RAMHard DriveOSMonitor
Kingston ValueRAM DDR3-1333 WD Caviar Blue Windows 7 64-bit Sony 32" TV set 
Case
Apex TX-381 
CPUGraphicsRAMHard Drive
Core i5 430M GT230M (1 Gb dedicated) 8 GB DDR3-1066 640 GB 
OSMonitor
Windows 7 Home Premium (64-bit) 15.6" 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › A few questions regarding server things